Touch Board + Grapher
Use the grapher to visualise the sensitivity and precision of the Touch Board’s sensors.
We’ve developed the Grapher as a tool to visualise the 12 sensors of the Touch Board. This way you can see how your sensors are behaving, which is useful for developing and prototyping.
Add stability to your project with shielded cable.
Best practice when making Touch Board sensors
Learn how to trigger the Touch Board over distance.
Upload DataStream to your Touch Board
To use the Grapher, you need to download the “DataStream” code to the Touch Board. You can find under
Make sure to select the correct Board and Port before hitting upload. If you haven’t set up your Touch Board with Arduino then make sure to complete the Setting up Arduino with Your Touch Board tutorial first.
Check that you’ve uploaded Datastream correctly by opening up the Serial Monitor in Arduino. You should see a stream of values, which you can pause by unchecking the “Autoscroll” box.
Download and install the Grapher
Next, you need to download Processing, if you haven’t installed it yet. Once downloaded, open and close it once so that it generates the necessary files.
Then, download our Grapher. Unzip the file and move the folder “mpr121_grapher” to the corresponding location:
Install the necessary libraries
With the folder in place, open Processing. You need to install two libraries for the Grapher, controlP5 and oscp5. In Processing, head to Sketch→Import Library→Add Library… In the search field, look for the two libraries and then click “Install”. Once you have installed the libraries, open the Grapher sketch, by heading to File→Sketchbook and then opening “mpr121_grapher”.
Run the Grapher
Plug in your Touch Board and run the Grapher sketch. Select your Touch Board from the dropdown menu that appears in the window. You’ll probably have a number of choices, but generally, the Touch Board is the last or near the end of the list, named something like “/DEV/CU.USBMODEM…”
You’ll know you’ve selected the right serial port when you see a scrolling display of data. Touch electrode 0 and you should see a reaction that shows a touch event. You can also view the data from other electrodes, either by selecting them from the dropdown menu or by using the arrow keys.
If you click “Help” you can see all the possible commands for the Grapher.
By pressing “S” you can view the solo mode where you only see the touch and release events on black and white.
In the bar mode, by pressing “B”, you can overview all of the electrodes at once and see when they are touched and released. Additionally, the bar mode allows you to set the threshold values of the electrodes separately, by clicking and dragging the thresholds. These threshold values are saved in your Touch Board, so if you turn the Touch Board off and on, it will have the same threshold values as you set them in the bar mode.
Reset the Touch Board
Whenever you attach something to the electrodes of the Touch Board, you need will need to reset the board. The Grapher is also able to reset the Touch Board, so that if you connect something to the electrodes, you don’t need to manually turn the board off and on again. Instead, you can do it by clicking the reset button.