How to send data via Bluetooth with the Touch Board
Find out how to send data via Bluetooth with the Touch Board
Using Bluetooth with the Touch Board allows you to send data from the Touch Board to your computer. You can use this data for programs, like projection mapping, to further modify your projects. All you need is the Touch Board, the HC-05 module and some wires. At the moment this tutorial focuses on macOS computers only, but we’ll update this tutorial for Windows soon!
Find out how to use Bluetooth speakers with the Touch Board
This tutorial will show you how to debug the Touch Board and get started with your project
Find out how to do projection mapping with the Touch Board
To begin you will need:
HC-05 Bluetooth module
Setting up the Touch Board
Before you get started, you first need set up the Touch Board. You can do this by following the Touch Board set-up tutorial.
We are going to use the “SimpleTouchBluetooth.ino” sketch. You can download the sketch from our GitHub repo, open it in the Arduino IDE and then upload it to your Touch Board. After the code has uploaded, turn the Touch Board off and disconnect it from your computer.
Connecting the Bluetooth module
With the Touch Board off and disconnected, it’s time to connect the HC-05 Bluetooth module to the board. We recommend soldering some headers to the Touch Board, for which you can use our soldering tutorial. To connect the board to the module, we use a breadboard and jumper wires. The connections from the module to the board are as following:
- VVC -> 5V
- GND -> GND
- TXD -> RX (pin 0)
- RXD -> TX (pin 1)
When you have connected the module to the board, you can power the Touch Board again. Since we are using Bluetooth, the board doesn’t need to be connected to the computer anymore.
Connecting 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 are now connected to the Bluetooth module.
If you now open Terminal, enter “ls /dev/tty.*” to see a list of all 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!
Now that you are able to send data from the Touch Board to your computer via Bluetooth, you can incorporate this into your project. For example, you could use Processing, to then use the incoming data for projection mapping.