You will have noticed in our store the nifty "Uno R3 Wifi" - an Arduino compatible board which features an UNO R3 with Wifi enabled by having an ESP8266 on the same board.
The board is also commonly known as XC4411 (in case you want to google more about it).
Setting the DIP switches
The board is designed for the UNO and ESP8266 to be programmed as their own devices and then allowing communication between the two devices.
The operating modes:
- Program Arduino UNO
- Program ESP8266
- Connect to ESP8266 (via serial port)
- Connect Arduino UNO and ESP8266 to let them play together
- Run Arduino UNO and ESP8266 independently (they can't see each other)
is achieved by an array of mini (or should we call them micro?) DIP switches.
The combination of seven switches (the eight doesn't have a function) will set the operating mode as follows:
I want to | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
.. program Arduino | OFF | OFF | ON | ON | OFF | OFF | OFF | NA |
.. program ESP8266 | OFF | OFF | OFF | OFF | ON | ON | ON | NA |
.. connect to ESP8266 (Serial) | OFF | OFF | OFF | OFF | ON | ON | OFF | NA |
.. connect Uno to ESP8266 | ON | ON | OFF | OFF | OFF | OFF | OFF | NA |
.. run UNO and ESP8266 independently | OFF | OFF | OFF | OFF | OFF | OFF | OFF | NA |
As with many things ESP - you will need to put - after setting the DIP switches - the ESP into programming mode by pressing the "ESP Reboot" button.
Setting up Arduino IDE
The Arduino IDE already knows about the UNO, however - if you are not already using ESP8266 boards in your IDE - you will need to load the ESP8266 into the IDE Board Manager.
Rather than rehashing the "How to setup ESP8266 in Arduino IDE" here, I recommend to have a look at Random Nerd Tutorials which have covered the topic very well across different OS. For us the only difference is the physical connection of the board to the IDE .. USB cable, set the dips, hit the "ESP Reboot button" - for the instructions click here
UNO/ESP8266 integration
The integration between the UNO and the ESP8266 boards works the same way as if you would connect a ESP8266 board (ESP01-S, NodeMCU, etc.) to an UNO via cables and the respective pins and make them communicate via the serial ports using serial.write()
and serial.read()
.
See here a sample code - download.
Here are really great instructions from the guys at Iinstructables.com - only difference for you is that you do not need to wire the two boards together as you are have them on a single board. Just use the DIP switches to point the USB TTL to the right board and then to connect them together.
https://www.instructables.com/WebServer-Arduino-UNO-With-WiFi-ESP01/
Any questions - drop us an email.