Flex Sensor, Push Button Switch, & Two LEDs (Video/Code Below):
In this setup, I added a push button switch to the breadboard, connected to digital pin D4. This is alongside the existing flex sensor and two LEDs. With adding the push button, the code now can operate in more than one method. For example, when the button is not pressed, the flex sensor's bend dictates LED behavior, lighting up the red LED for medium bends and both LEDs for high bends (as shown in the previous example). However, when the button is pressed – the LEDs blink quickly ten times for high bends, and blink slowly three times in an alternating fashion for medium bends.
Content Rating
Is this a good/useful/informative piece of content to include in the project? Have your say!
You must login before you can post a comment. .