In this tutorial, you'll be making a scooter with RGB LED Underglow sensitive to the scooter's speed. This project uses the Digital Hall Sensor Whisker and a strand of RGB LEDs.
1. Solder wires to short the following connections on the Proto Board TinyShield
A(hallPortNumber) to Pin 8 (where hallPortNumber is the number on the Whisker Adapter TinyShield where the Hall Sensor Whisker is plugged into).
NOTE: do not use port 0 for this, as it will mess up the uploading process if connected to the processor during the upload
2. If using RGB LED light strip, Solder Whisker connector to RGB LED strip.
3. Stack TinyDuino, USB TinyShield, TinyShield Proto Board, Whisker Adapter TinyShield
4. Plug RGB LEDs into Port 0 on the Whisker Adapter TinyShield
5. Plug Hall Effect Sensor (D) Whisker into Port 1 on the Whisker Adapter TinyShield
6. Upload code and test that the lights respond to the magnet passing by the Hall Effect Whisker. (Pass by the sensor multiple times)
7. Mount to scooter.
Upload the following code to the TinyDuino. Be sure to select:
Click here to download the code .zip file if you haven't done so already!
The following changes are needed for accurate speeds:
You can see all of the Predefined RGB colors in the header file pixeltypes.h starting at line 594: https://github.com/FastLED/FastLED/blob/master/pixeltypes.h
There are a LOT of colors. You can use these colors to customize your Audio Visualizer.
When mounting the magnet to a wheel, it is important to locate in such a way that it is close to the Hall Effect Sensor as the wheel rotates. A stronger tape such as duct tape will usually do the job for this, as can be seen with the black tape below:
Each application of this project will have hardware mounted in its own unique way depending on the layout of the scooter or bike you are mounting to. It is important to house the electronics in such a way to avoid dirt, dust, and water from getting into the electronics.
Double-sided tape and a few zip ties will work fine for this project. The primary concern is making sure that voltage and ground connections do not short on the frame of the scooter or bike. A vulnerable place for this to happen is on the underside of the TinyDuino where both voltage and ground pads are present. Do not put this side of the board directly on the frame. Place electrical tape across these terminals to avoid damaging the electronics.
Another concern is making sure the Hall Effect Whisker is secure enough such that it will not fall off or get caught in the spokes of the wheel.
As always, if you have any questions or feedback, feel free to email us at email@example.com.
Thanks for making with us!