Body Position Indicator

Building on my Orientation Switch from last week, I added a green LED to my circuit to provide a visual indicator for both the flat and upright positions instead of having a single LED turning on or off to indicate the position. I configured my switch so that the red LED would turn on when the circuit is lying flat and the green LED would turn on when the circuit is positioned upright.

To achieve this, I used the tilt switch input as a variable for my conditional statement. If the switch was on (circuit in flat position), the red LED would turn on and the green LED would turn off, and vice versa.

 

View post on imgur.com

Position flat: Red LED on, Green LED off

View post on imgur.com

Position upright: Green LED on, Red LED off

View post on imgur.com

I attached the circuit to my chest so that the red LED would be on when I am lying down and the green LED would be on when I am upright. This can function as a rudimentary sleep/wake indicator based on body position alone. And this time, I’m not using my hands!

Leave a Reply