Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Zemzem Mehdi
#22254 Hello Everyone
I'm new to ESP01 developing and i'm facing a bit of a problem here .
I'm connecting my ESP to the PC through a USB/TTL 3v3 adapter without Reset and DTR but i'm sure i made the correct connections because i managed to get answer from the ESP and to upload my own code using the Arduino IDE.
My Problem is the following :
This Code Works
Code: Select allvoid setup() {
  // put your setup code here, to run once:
Serial.begin(115200);
}
void loop() {
Serial.write("hello");
delay(5000);
}


But this one shows nothing on the Serial Monitor :
Code: Select allvoid setup() {
  // put your setup code here, to run once:
Serial.begin(115200);
Serial.write("hello");
}
void loop() {
}


Also i tried the HelloServer Exemple , none of the Serial.write Works but i know that the code is working because i managed to find the webpage and see the message displayed.
Help me please and thank you
User avatar
By brutzler
#22282 Second code is working too. (on my ESP)

Perhaps you are starting the serial monitor too late?

BTW:
Why is this a "serial.read" problem?
User avatar
By Zemzem Mehdi
#22324 The Thing is that sometimes i flash a code(mostly when flashing something with Wifi and Serial in it ) and leave bootloading mode(GPIO0 from GND to floating ) , the esp stops being detected by my pc so i can't even check the serial monitor.

for the name thing, i also have a serial read problem. Every time i try Serial.read() , the arduino IDE stops working and i have to kill the program.
Code: Select allvoid setup() {
  // put your setup code here, to run once:
Serial.begin(115200);
}
void loop() {
   if(Serial.available())
   {
    Serial.write(Serial.read());
delay(500);
   }
}