I plugged in the Arduino Uno and the ESP8266 following this schema:
When I enter "AT" in the serial monitor, I get an "OK". I can also connect to my wifi using typical ESP8266 commands.
What doesn't work is passing these commands using an Arduino Script. For example, if I use this script, I don't get an "OK" from the ESP8266.
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("AT");
delay(10000010000);
if(Serial.find("OK")){
Serial.println("OK");
}
else{
Serial.println("NOT OK");
}
}
I tried a bunch of different codes,and nothing works. What am I doing wrong?

