Output Device: LED Color Indicates Tilt

This week I wanted to connect a tilt sensor to an RGB LED, dividing up the spectrum of tilts into discrete ranges in which a single color would be displayed. The hardware is all in place, but the software still needs a little work.

Water Tube Tilt Sensor

Sure enough, a tube of water with a bubble of air can be used as a capacitive tilt sensing device. Here is what mine looks like:

It uses the hello.step board with the python script hello.step.45.py to read out a sampled charge-up cycle curve to a GUI. I didn't manage to debug my step board, so I am using Inna's hello.step at the moment. Thank you Inna.

RGB Board

I made the hello.RGB board, and it behaved as expected. To make a battery power cable I spliced, soldered, and taped the larger 9V battery cable wires to the smaller, MTA'able ribbon cable wires.

Connecting the Boards

The plan is to establish unidirectional communication using MOSI to MISO communication over a 5-pin to 5-pin cable.

Step Board

RGB Board The step board code is modified to transmit over MOSI instead of the serial txpin. We also eliminate framing to minimize the length of the string transmitted for each measurement.

Modified Step Board Code

The RGB board code is modified by adding the getchar routine, and changing the display routine to deduce behavior from the contents of the memory register where the received by is stored.

Modified RGB Board Code

Current status: getchar added, but light behavior not yet modified to respond to register contents.