My problem is it is not responding to any AT commands and I can't seem to get anything out of it. I'm trying to connect to it through the Arduino serial monitor and have tried pete's esp8266 terminal program as well. The only time I get anything out of the chip is when I disconnect the chip-powerdown pin from VCC then reconnect it. There are a lot of guides online on how to connect an ESP8266 to an Arduino uno but there’s too much confusion and not enough explanation. So I’m going to give you the quick version along with the details. Connecting the ESP8266 to an Arduino The steps you need to take are simple. This is written for the ESP8266-01 but you can find the pinout for other models easily and use the same pins. First we will connect the Arduino UNO to a breadboard: • Connect the Arduino’s 3v3 (3.3V) output to the red line on a breadboard. The ESP8266 works with 3.3V and not 5V, so this is necessary. If you want to connect other components that use 5V, you can connect the 5V output to the other red line of the breadboard, just make sure you don’t connect the two. • Connect GND (ground) to the blue line. • Connect the RES or RESET pin to the blue line. When you ground the reset pin, the Arduino works as a dumb USB to serial connector, which is what we want to talk to the ESP8266. • Connect the RXD pin of the Arduino to the RX pin of the ESP8266 (yellow color in the picture). • Connect the TXD pin of the Arduino to the TX pin of the ESP (green color in the picture). Usually, when we want two things to talk to each other over serial, we connect the TX pin of one to the RX of the other (send goes to receive and the opposite). Here we do not have the Arduino talk to the ESP8266 though, our computer is talking to it via the Arduino. • Connect the GND pin of the ESP to the blue line and the VCC pin to the red line. • Finally CH_PD goes to the red line, supposedly it will not work if you do not connect this. According to a I found: ESP-01 and ESP-03 were initially meant to be used as an Arduino WiFi module. In that aspect it made sense to break out CH_PD so that the user could disable the device when not in use (to save power). Using the Arduino IDE In the Arduino IDE, you don’t need to choose a board, as we’re not uploading anything to the ESP8266. Just choose the right port in the Tools menu and go to Tools → Serial Monitor. Then simply set your baud rate to 115200 (the default ESP8266 firmware uses it) and your line endings to Both NL & CR. If you type AT in the message field and press enter, it should respond with OK. And since we talked about the CH_PD pin, remember that if you want to flash the ESP8266 you should connect the GPIO0 pin to GND (blue line), which puts the ESP into flash mode. So there you have it! If you have any questions, ask below and I’ll do my best to answer! I tried to say thanks yesterday but my comment did not show up, maybe I need you to do simple “how to leave a comment?” Anyhow, that reset connection, genius. I had spent two days playing with the ESP01s via a Uno with pretty much no luck. I have done lots with the raspberry Pi and toyed with the Uno and programmable LEDS but this was proving to be hair pullingly hard. Then I came to this site/blog/gem finally, trying to start my new wee project, still with hope and little else. Within minutes of reading this page, I had a response. Then I was able to reconfigure the beast. Now I have, all be it via AT commands a response from the server over WiFi. OK, so maybe I would have got there but maybe the esp01s would have got to the bin first. Lots more to do and learn but at least “It’s Alive” So, Cheers, Thanks and other happy, grateful words. Running windows on mac mini. Connecting an ESP-01 (which defaults to 115200 baud) to an Uno (that with software serial can only talk at 9600), you have to first connect the ESP-01 to the Arduino’s hardware serial like this: RX->RX(0) TX->TX(1) Make the arduino serial monitor 115200, and issue the commands: AT AT+RST AT+UART_DEF=9600,8,1,0,0 Then you can move the ESP-01 back to your regular software serial lines (e.g.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |