How to send data via Bluetooth with the Touch Board with HC-05

Find out how to send data via Bluetooth with the Touch Board

Bluetooth is one of the most common wireless communication and using Bluetooth technology with the Touch Board allows you to send data from the Touch Board to your computer. You can use this data for programs to further enhance your projects and create Bluetooth smart sensors. All you need is the Touch Board and the HC-05 device to turn your Touch Board into a Bluetooth device. We use the Touch Board Pro Kit as it comes with the Proto Shield but you can also use a breadboard and wires.

At the moment this tutorial focuses on macOS computers only, but we’ll update this tutorial for Windows as soon as we can!

Step 1 Setting up the Touch Board

First, we connect the HC-05 Bluetooth device to the board. We use the Proto Shield from the Touch Board Pro Kit, but you can also a breadboard, headers and wires. If you don’t know how to solder headers to the Touch Board, please use our soldering tutorial. To connect the board to the module, we use a breadboard and jumper wires. Follow this wiring diagram to connect the Bluetooth module to the Touch Board. 

Step 2 Upload the code

If you haven’t set up your Touch Board, then check out the Touch Board set-up tutorial.

We are going to use the “SimpleTouchBluetooth.ino” sketch, which you can download the sketch from our GitHub repo, open it in the Arduino IDE and then upload it to your Touch Board. 

Step 3 Connect to the Bluetooth module from a computer

On your computer, go to System Preferences and then Bluetooth. The HC-05 module should appear and you should be able to click “Pair”. You then need to click under “Options” and enter “1234” as a code. You have now established a Bluetooth connection to the Touch Board.

Step 4 Receive data

Let’s give it a test. If you now open Terminal, enter ls /dev/tty.* to see a list of all available devices connected to the computer. Our Bluetooth module appears as “/dev/tty.HC-05-DevB”.

Next, enter screen /dev/tty.HC-05-DevB. If you now touch the electrodes, it should appear within the terminal window!

Step 5 Next steps

Now that you are able to send data from the Touch Board to your computer with this wireless technology, you can incorporate this into your project. For example, you could use Processing, to then use the incoming data for projection mapping. Or you can create a smart sensor with IFTTT or communicate with a whole range of electronic devices.

If you want to use Bluetooth speaker or Bluetooth headphones, check out our tutorial, where we use a Bluetooth adapter.

We would love to hear your ideas, so please share your wireless device creations with us by sending us your images or videos at info@bareconductive.com or via Instagram or Twitter.

Also, if you have any troubles, have a look at our Troubleshooting Guide, our FAQs or contact us at info@bareconductive.com.

Have you seen these related resources?