The following are some questions related to this project along with some suggested code challenges. The idea is to provoke thought, test your understanding, and get you coding!
While the sketches provided in this guide work, there is room for improvement and additional features. Have fun playing with the provided code to see what you can do with it. Or do something new and exciting!
- Is it possible for multiple hand positions to be reported at the same time?
- Is it possible for hand positions to be falsely reported?
- Why was a value of 5 used for the thresholds?
- Use the light sensor to automatically adjust the NeoPixel brightness.
- Change the color of the NeoPixels.
- Change the
if/elseblock for the hand up/down check into a single
ifstatement. (hint: invert logic)
- Use the speaker to add an audio cue that the turn signals are active. This let's the rider know the signals are engaged without needing to look at the glove.
- Add additional hand position detections and animations, for example slow down/stop.