How To Add WiFi To The Touch Board

How To Add WiFi To The Touch Board

Learn how to add WiFi to the Touch Board with the ESP8266 and connect your Touch Board to the internet

In this tutorial, we're going to show you how to connect your Touch Board to the internet with the ESP8266 module. 

We love it when you share your projects! Post your project on Instagram, YouTube, or Twitter, and make sure to tag @bareconductive or use #bareconductive. You can also send your videos and photos to info@bareconductive.com so we can post them on our site for the world to see.

You will need:

1 x Touch Board
1 x ESP8266 module
1 x Proto Shield / breadboard
4 x 1kΩ resistors
Wires

Connect the ESP8266 module to the Touch Board

In order to connect the ESP8266 module to the Touch Board just follow the wiring diagram below. You can either use a breadboard to wire everything up, or if you have the Proto Shield, solder everything together on the shield. It's important to connect to the 3.3V power rail and not the 5V.

ESP8266 Module
Touch Board
VCC (red) 3.3V
Reset (yellow) 3.3V (with 1 x 1kΩ in series)
CH_EN (orange) 3.3V (with 1 x 1kΩ in series)
TX (green) RX
RX (blue) TX (with 1 x 1kΩ in series and 1 x 1kΩ to GND)
GND (black) GND

 

Upload the esp8266_simple code to the Touch Board

If you haven't uploaded code to the Touch Board before or just need to refresh your memories on how to upload code, please refer to this Arduino set-up tutorial.

When you're ready to change the code, close the Arduino IDE and then either clone the code from our GitHub or download the ZIP file here. Extract the contents somewhere that suits you and open the esp8266_simple.ino file.

Next, you need to add the ESP8266 library to Arduino. Within Arduino, go to Preferences and in "Additional Board Manager URLs:" enter:

http://arduino.esp8266.com/stable/package_esp8266com_index.json

Then go to Sketch  Include Library → Manage Libraries... and search for "wifiesp". Install the WiFiEsp library.

With the library installed, you can now edit the code. Inside the code, you need to change the settings of the code for your own internet settings. In line 50, find the variable

char ssid[] = "";

and enter your WiFi name. In the line below, line 51, find the variable

char pass[] = "";

and type your WiFi password. Don't worry, only you can see the code, so this is safe to do so.

Then, upload the code to the Touch Board, making sure to select the right settings, in Tools → Board and Tools → Port. 

Open the Serial Monitor of the Arduino IDE and change the BAUD rate to 115200. After a couple of seconds, you should get confirmation that your Touch Board has connected to your WiFi!

Next steps

Now that you can connect your Touch Board to the internet, you can explore a whole range of smart projects. The Touch Board is based on the Arduino, so many Arduino tutorials are applicable to the Touch Board.

We want to thank Jumper Code who helped us with this tutorial!