Internet beholds the power of IoT. To solve every day problems smartly we need to connect our devices with internet. For Adruino based applications you can use Ethernet or Wifi shields. Most popular WiFi shield available in market is ESP8266. There are different variants of this WiFi device the one I will be using is WiFi shield by Wang Tongze.
- AI-Thinker Firmware: https://raw.githubusercontent.com/sleemanj/ESP8266_Simple/master/firmware/ai-thinker-v1.1.1-115200.bin
- ESP8266 Flasher tool: https://doc-00-9s-docs.googleusercontent.com/docs/securesc/a9b1254bs1us64pqmr38r78ccvertirr/st5stip3lcmlm7ijjk63pmti6kl2ctbk/1498903200000/05702476862157177151/02970016904424219159/0B3dUKfqzZnlwVGc1YnFyUjgxelE?e=download&nonce=9li1ovn7lekh0&user=02970016904424219159&hash=n3kvk8tkjal7jmbco10l3o7jspku5el0
- Arduino Uno/Mega
- ESP8266 WiFi Shield/Module
- FTDI cable (Optional)
- Connector cables
- Connect Arduino RESET pin with Arduino GND pin as shown in picture below:
- Connect ESP8266 TX and RX with Arduino TX and RX as shown in picture below:
- Connect ESP8266 +5v and GND with Arduino +5V and GND as shown in picture below:
- Turn on switch 3 and 4 as shown on ESP8266 shield. It will enable firmware upgrade mode on shield.
- Connect Arduino with PC.
- Open esp8266_flasher.exe which you downloaded from link given in software requirement section. Locate firware path and set you com port. Click Download to start firmware upgrade.
Setting up baud rate:
By default this shield be configured to communicate at 115200 baud rate. But Arduino serial comm supports 9600 baud rate only. In order to change baud rate we need to hook up ESP8266 with Arduino.
- Turn on switch 1 and 2 as shown on ESP8266 shield. It will enable TTLSW mode on shield.
- Connect Arduino with computer and open Arduino IDE.
- Go to Tools > Serial Monitor
- Type following command and click Send button: AT+UART_DEF=9600,8,1,0,0
That’s it you are ready to start programming with your ESP8266 WiFi Shield.
Note: There are various ESP8266 modules available in market and most of them operate on 3.3v. In such case make sure you are using a voltage regulator otherwise you might damage your board. Always double check your connections and switch positions.