Hi, I just got this (knockoff) arduino today, and wanted to see what I could do with it.
4 hours later (I suck at coding), I've finally written some very inefficient code for those flashing lights at crossings. Since I plan on using LEDs for my lights, they tend to just blink on and off. I wanted to recreate the fading effect, where they fade in and out intead of just blinking. And I wanted it to be controlled by a button(which Im sure you can replace with a sensor of sorts).
The final product has a very soft fade in and fade out sequence, and also the lights dont shoot on or cut off, instead they finish the current sequence before turning off.
Im away from all my tools and supplies, so I cobbled together some blue LEDs and manually held a wire to simulate a button. A very poor setup haha
Here's how they turned out:
Add some sensors, maybe get some gates, and get a speaker for a bell chime and you can have a full system!
All you need for wiring is two LEDs, a few resistors and a button.
Wire the two LEDs into pins 9 and 10 along with their given resistors. Wire the button as shown in this link: https://www.arduino.cc/en/Tutorial/BuiltInExamples/Button
Code: https://drive.google.com/file/d/1zp54-t24x6gKOfvcwQazhVNd6Gv6WHKx/view?usp=sharing
---------------------------------------------------------------------------------------------------------------
Modeling the PRR & NYC in HO
Youtube Channel: www.youtube.com/@trainman440
Instagram (where I share projects!): https://www.instagram.com/trainman440
Yours looks very good!I’m working on a diorama for taking pictures and needed a crossing so I put together a pair of signals from scrap K&S brass and used a NANO as a flasher.I used a UNO with servos for the crossing on my layout. The Arduino FC-51 makes a good IR detector to trigger the crossing.I just use a toggle switch for my diorama. Mel My Model Railroad http://melvineperry.blogspot.com/ Bakersfield, California I'm beginning to realize that aging is not for wimps.