Post topics, source code that relate to the Arduino Platform

User avatar
By Carlo S
#25165 Hi everyone,
I'm new to Arduino and I've just bought a new module ESP8266.
I know that it works with 3,3 V and I've tried to program it either with Arduino UNO (risking to broke it with 5V) and with Arduino DUE (which works with 3,3V).
I've connected it as all the tutorials say (that is: TX to RX1 Serial, RX to TX1 Serial, GND, 3,3V on two pins of it, and I've also tried to connect RST).

It doesn't absolutely work, and this is my code:

void setup() {
Serial.begin(115200);
Serial1.begin(115200, SERIAL_8N1);
// Serial1.begin(115200);
//pinMode(8,OUTPUT); //this was RST pin
// digitalWrite(8,LOW); //I've tried HIGH and LOW besides lefting it FLOATING
}

void loop() {
while (Serial.available() > 0) { //listen to the USER
int inByte = Serial.read();
//Serial1.write(inByte); //I've tried to write the entire command from Serial
Serial1.println("AT+RST"); //for each character I write it tries to send this entire COMMAND
//Serial1.println("\u0002AT+RST\u0003\u0013"); //I've also tried to PUT <STX>COMMAND<ETX><CR>
}

while (Serial1.available() > 0) { //listen to the MODULE
int inByte2 = Serial1.read();
Serial.write(inByte2); //it writes the answer of the module on Serial
}
}


As you can see, I've tried many solutions (also following the tutorials) but nothing....
The previous code returns (on Serial):
AT+RST
busy p...
ERROR


Instead, if I remove GND jumper and attach it again it responds:


<a big number of weird characters...>
j
þrlŽ�K
Ai-Thinker Technology Co. Ltd.

ready


Obviously Serial Window baudrate is set at 115200....

Do you have any suggestions??

Thanks very much for your support! ;)
User avatar
By AcmeUK
#25273
<a big number of weird characters...>

Those are boot messages a 74880 baud! If you can read those the device is still alive! Please do not connect to 5v data! It will work but you risk 'frying' the data input on the device.
User avatar
By tytower
#25348 When it says ready its telling you its ready to receive your AT commands . I don't know how to program in AT . Normally the tutorials just teach you to type in the command followed by a CR and NL from the terminal .

Read up a bit and check your connections especially GPIO0 which must be low to enter UART or programming mode . Then when you have your program on it take it high and boot the chip to enter FLASH or running mode.