Garage parking sensor using addressable RGB LEDs to provide feedback to vehicle driver as they approach and reach stop (park) position.
Project tutorial by Bcjams
To add pots and switches, all you would need to do is connect them to some unused pins and use these to set the ‘startdistance’ and ‘stopdistance’. You can google this to find examples of how to make variables set using pots and switches. Sorry, but I don’t currently have the time to write some example code for this. Packaging these might be a bit tricky, as there is not much room inside the control box to add more wiring. If you have access to create your own Cad models, a suggestion would be to add a spacer ring under the top cover (where ultrasonic sensor is mounted).
The way the code works is the lED’s are mirrored left side and right side , so whatever happens to right will be same on left. The Led’s are numbered 0 through 14 (15 leds in total, with the 0 position closest to control box. As you read through code you will see at maximum range all LED’s are green. As an object approaches the ‘stopdistance’ lights at outer ends turn off. As object moves even closer, anybremaing lights will begin turning yellow and continue turning off sequentially until only one remains lit on either side of center. As soon as object reaches stopdistance all lights turn on red. If objects continue to get closer all red lights remain on.
You can change program any way you would like as you because familiar with programming. One thing you could do is have all lights flash red if object continues to move past the stop distance. Anything is possible. You would do no harm by experimenting which is half the fun of the project.
Great to hear that you have it working! You are on track with going for the stranded wire. I use silicone 22 AWG wire which is sufficient for the current and is. very flexible. It is a tight package to wire up, but very doable if you are careful and patient. Also plan ahead with where you want to splice your wiring to branch off to the various points of connection. I created the primary splices and tucked them under the Arduino.
Or connect with your social account:
New here? Create an account