ESP8266 baud rate not working with Arduino

Talk about Arduino board, sheilds. Sharing Arduino projects, program, problems, solutions, suggestions..... many more, all are welcome.

ESP8266 baud rate not working with Arduino

Postby pacavis » Tue May 17, 2016 2:38 pm

Hello, My wifi shield works at all Baud rates on Serial monitor. My arduino Mega also works well at all Baud rates on Serial monitor. But why is it the arduino Mega only talks to the shield at a baud rate of 9600. Others like 19200, 38400, 57600 dont work. My application does need higher speeds than 9600 due to the enormous data it sends. Its taking about 15secs to send. Would like to reduce that to at most 5secs
pacavis
Fledgling
 
Posts: 1
Joined: Tue May 17, 2016 2:34 pm

Re: ESP8266 baud rate not working with Arduino

Postby bengchet » Tue May 17, 2016 7:19 pm

Hi,

First I don't know which WiFi shield you are refering to, but if you are using WiFi shield that requires SPI communication, it is nothing to do with baudrates. ESP8266 shield is using serial communication, initially it is designed for Arduino Uno Software Serial communication, so baudrate is designed to lower value as well for stable performance. However if you are using Arduino Mega, it might be achieved with some modifications.

1. Enter AT command to onboard ESP8266 module. Command is AT+UART=115200,8,1,0,0. This command is to configure module to run in 115200 baudrate. Please refer to our user manual on how to enter AT command.
2. Use hardwareSerial of Arduino Mega e.g Serial1, Serial2 etc. If using Serial1, take out mini jumpers from shield, connect right side pin of D11 to TX1 and right side pin of D10 to RX1.
3. Use the following modified library and example. Copy and replace the .cpp and .h file to the library. Make a copy of original library before you replace those files.

Run the example to see if it could work. Then try running your sketch to see if there is any improvement.

P:S ESP8266 is not a very good choice to send enormous data fast in my experience and opinion.
Attachments
file.zip
(9.96 KiB) Downloaded 233 times
bengchet
Moderator
 
Posts: 237
Joined: Tue Aug 25, 2015 8:29 am


Return to Arduino Based

Who is online

Users browsing this forum: No registered users and 18 guests

cron