PROBLEMS GETTING MY ESP8266 WORKING
Posted: Thu Aug 06, 2015 3:58 am
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!
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!