Sci Fi Your Pi – Project Update #7

There was some nice weather in Belgium the past week, and I took the opportunity to prepare the garden for summer. Mowing the lawn, planting some herbs, cleaning the terrace, etc … This means that I didn’t make a whole lot of progress on my project this week, but it doesn’t mean I didn’t do anything either. For this week’s update, I’ve been combining some components I got up and running in the previous weeks, more specifically: the Touch Board and the Raspberry Pi with LED strip.

I hooked up the Touch Board via USB to the Raspberry Pi and had it send PLAYX (where X is the number of the electrode pressed) messages to the Pi over serial. Listing the tty devices, I determined the Touch Board was the “ttyACM0” device.

I installed “minicom” to verify the expected serial messages where being received by the Pi.

Using the minicom command with parameter “s”, the serial port information can be configured. I specified the correct interface and baudrate and could see the messages coming in.

Screen+Shot+2015-05-29+at+18.58.07 Screen+Shot+2015-05-29+at+19.17.36

To be able to read from the serial interface from Python, I tried to install the “python-serial” module. It turned out to be pre-installed.

After taking the “” NeoPixel strip example and modifying it to react to serial input, the PLAY messages could trigger the LED strip. It does not yet make a distinction between the buttons being pressed, but the mechanism itself is working.

The Python script reading the serial input and triggering the LED strip can be found here:

And finally, a short demo:

Leave a Reply

Your email address will not be published. Required fields are marked *