ESP8266 configuration and WEB communiction
I know that you know what is ESP8266 module. I do not want to west your time for basic rote learning information. ESP8266 is a UART Serial to Wi-Fi Wireless Module with AT commends. In this tutorial we are not using arduino IDE and/or other IDE relative to this module. We will use ANSI C language codes with PIC18f2520 microcontroller. you can use given below codes to other controller with make few changes according to your controller function resisters.
Hardware
Fist we will make hardware circuit according to picture.
In this circuit i am using 5v controller so i made voltage divider on controller transmitter pin, controller gives 5v voltage on high and voltage divider makes it 3.33v that suitable for ESP. If you are using 3.3v controller you would not need to divider circuit, connect directly to controller TX pin to ESP RX pin. Pay attention CH_PD pin should be high (VCC), otherwise your ESP nothing will do. ESP reset pin should not connect anywhere in normal running condition. Reset pin uses at flashing time and should be GND or uses for hardware reset. I will say forget reset pin during normal operation. We can reset module with AT command (AT+RST). That is end of hardware connections and now we will turn to software section.
Software
Such as i have told that ESP module works with AT commands. If you know what is AT command, that is nice. If no… AT commands are instructions used to control a modem. AT is the abbreviation of attention. Every command line starts with “AT” or “at”. That’s why modem commands are called AT commands. … Note that the starting “AT” is the prefix that informs the modem about the start of a command line. Download AT command set for ESP pdf file. In AT command user manual are lot of AT commands with descriptions.
We will try some basic testing with window terminal application like Real Term.
First AT command
Command – AT\r\n
Response – OK
If you don’t get this response then check for blow points:
- Check hardware connections are mentioned above section (the blue LED on the board should flash while you send AT command).
- Try swapping RX & TX. Correct baudrate–should be 115200 on the default firmware version (00160901).
- Correct line endings–should be Carriage Return.
AT command sequences for quick starting as server mode
AT
OK
AT+RST
ready
AT+CWMODE=1
OK
AT+CWJAP="<access point name>","<password>"
Hello ESP
SEND OK
A nice ESP configuration software :-
Update ESP8266 AT firmware :- http://embeddedooo.blogspot.in/2017/03/update-esp8266-firmware-with-nodemcu.html
No comments:
Post a Comment