Is this touch?
Sensor and application to generate training data for my Signal Classifier to turn objects into touch-sensitive interfaces.
- [x] Build the sensor prototype with Arduino Uno
- Get clean data and test the sensor
Rewrite Code for ESP
- Write an application to generate training data
- Realtime plotting
- Matching serial communication to the Arduino Touché sensor
- Start / Stop Sequence
- Save Dataset
Build the sensor prototype with Arduino Uno
Rewrite Code for ESP
Because of the smaller size, Bluetooth and Wifi I wanted to rewrite the code to ESP. This way I wanted to understand the code better. After a few hours and trying to find a alternative for the Arduino "timer register" on the ESP or to find a workaround, I put the attempt aside. The best result I could get was the differentiation between touch and no touch, but that was extremely noisy and no different from a normal capacitive sensor.
Write an application to generate training data
To better understand serial communication I built a small simple Capacitive Sensor with an ESP. With its data I built a first Python script to test the serial communication and to plot this data afterwards.
Understanding the Code and Serial
I like when my code is modular and therefore I wrote a small framework with two components to manage the serial communication and to plot the data.
Here I had to find out more about threads and threading so that I could read the serial data and then process it by the plotter at the same time. Later, however, I found out that I had slowed down my code with this way. So now I only use the loop of matplotlib animation function to get my data.
Then I found out that it makes a difference if you map a stream of data or an array of data and so I had to add a switch for each case. I then tried to understand the technique of the original code how the Arduino Uno sends the data to plot the data the same way.
GUI / Plotter
For plotting I use matplotlib. For time reasons I decided not to write a own GUI with tkinter or qt. Matplotlib uses Tkinter under the hood and you can also add buttons and interaction elements to the window, this should be enough for the first version.
Matching serial communication to the Arduino Touché sensor
I have rewritten the "SendData" code so that I can see it in the Arduino plotter and display it in my Python version.
Sessions and CSV Data
You can now start sessions with the "Start Session" button and all data will be saved in a CSV file with session id. With "End Session" the session will be ended and no further data will be written to the file. Unfortunately I haven't found a solution yet how to make it visible that a session is running.
Final Version and Test
Inspirations and Papers
Info & Disclaimer
Submission for the 6th semester in Creative Coding, Interactive Media Design, supervised by Prof. Claudius Coenen (@ccoenen) and Prof. Garrit Schaap (@pixelkind)