UART ESP8266 and Software Serial - Slower baud rate

Continuing the discussion from Arduino Uno + Grove Wifi V2:

Hi there,

Just a +1 on using the really useful library WiFiEsp. It's very well written, it has lots of debug options and you can learn A LOT if you go through this library's source code too!

I did notice that using SoftwareSerial that rates above 19200 (especially w/o hw flow control) don't really work that well so if you want to use a Grove ESP8266 or something similar controlled by the AT command set from Espressif I recommend that you lower the baud rate like this:

void setup() {

 ...

  wifiLink.begin(115200);
  WiFi.init(&wifiLink);
  wifiLink.println("AT+UART_CUR=19200,8,1,0,0");
  wifiLink.end();
  wifiLink.begin(19200);

You should get an output like so (using the example ScanNetworks sketch included with the library):

[WiFiEsp] Initializing ESP module
[WiFiEsp] >>> TIMEOUT >>>
[WiFiEsp] >>> TIMEOUT >>>
[WiFiEsp] Initilization successful - 1.1.0
ready

Scanning available networks...
Number of available networks:9
0) BLACKPOOL1	Signal: -77 dBm	Encryption: WPA2_PSK
1) BELL292	Signal: -62 dBm	Encryption: WPA2_PSK
2) BECKY_INTERNAL	Signal: -53 dBm	Encryption: WPA2_PSK
3) BLACKPOOL1	Signal: -68 dBm	Encryption: WPA2_PSK
4) Francework	Signal: -91 dBm	Encryption: WPA_WPA2_PSK
5) TheCube2	Signal: -70 dBm	Encryption: WPA2_PSK
6) BECKY_INTERNAL	Signal: -61 dBm	Encryption: WPA2_PSK
7) Hambone	Signal: -94 dBm	Encryption: WPA2_PSK
8) HP4396B0	Signal: -82 dBm	Encryption: None

Cheers! and thank you Bruno (bportaluri in GitHub)!!
Here's the link to the library: GitHub - bportaluri/WiFiEsp: Arduino WiFi library for ESP8266 modules

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.