1

I was trying some AT commands using the monitor of the Arduino Web Editor with an Arduino Uno and a ESP8266 module. It was working at 115200 bauds but then I changed it with AT+CIOBAUD=19200 and now it can't communicate.

How can I change the baudrate to 115200?

Now I see this:

Monitor with weird characters.

1
  • How were you "trying" those AT commands? Commented Dec 2, 2017 at 19:41

1 Answer 1

4

Have you tried setting the web editor's baud rate to both the old and the new values? I ask because the CIOBAUD command has been obsolete for a while now so, depending on the age of your device, it may have done nothing. The command was replaced by "AT+UART_CUR" and "AT+UART_DEF" which have a different syntax.

See this answer to a similar question.

Update:

Yes, here's an example:

// Declare a serial object to talk to ESP8266
SoftwareSerial EspSerial(WIFITX_PIN, WIFIRX_PIN);  // RX, TX

void setup(void){
   // Init WiFi serial
   EspSerial.begin(9600);
   delay(10);
}

I've used 9600 baud in my example since SoftwareSerial may not work well at faster speeds.

Update 2:

Is it possible to send AT commands from the code instead of the monitor?

Yes, easily. Once the above code has run (and note that I've deleted an unnecessary line since update 1), you can send strings to the ESP with EspSerial.print() and EspSerial.println(). Here's an AT command example:

// Set 9600 baud, standard 8-bit frame, and save as power-on default:
EspSerial.println("AT+UART_DEF=9600,8,1,0,0");
3
  • Is it possible to set baudrate inside the code with a sentence? Commented Dec 2, 2017 at 20:22
  • Is it possible to send AT commands from the code instead of the monitor? Commented Dec 3, 2017 at 11:58
  • your question has been answered. why are you posting new questions here? Commented Dec 6, 2017 at 6:37

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.