We broke up the elements of our picnic table into a couple parts, and for this sensor experimentation we wanted to look into how we might sense pressure and translate that sensing into the brightness of lights. This would map to sensing people sitting down at our picnic table, and changing the brightness of the lights as more people sat down at the table. Working off the button example, we modified the code to constantly check for the state of three different buttons. Looping through each button state, we aggregated the count of which buttons are on then used that number to scale the brightness level of the LED.
No comments:
Post a Comment