Glowing Lego Tower Bridge
This project is using Arduino Leonardo and LED lights, as well as step motor to create a glowing and auto Lego Tower Bridge.
Supplies
Lego Tower Bridge set x1
Arduino Leonardo borad x1
LED Lights x
Step Motor x2
Elect
Building the Lego Tower Bridge
Buy one set of Lego Tower Bride and build it according to the instructions.
Setting Up the Circuit
Set the circuit up according to the diagram above.
Connect a red wire from 5v to the horizontal row with a plus sign.
Connect a black wire from ground to the horizontal row with a minus sign.
Connect a wire from D pin 2, ~3, 4, ~5 to a vertical row, respectively.
Insert the longer leg of the LED light (red, green, blue, white) into the same vertical row as the wire above.
Connect an electric resistant to the row with the shorter leg of the LED light.
Connect a wire from the row of the other side of the resistant back to the minus row.
Connect 2 step motor to L298N motor controller.
Connect four wires to D pin 6, 8, ~10, 13
Connect another two to usb for extra power.
Put the Circuit Into Place
Use an extensional cord for the LED lights and stick them to each floor, one with one colour, do it on both sides. Stick the motor on the two ends of the bridge, and connect the wheels with a rubber band.
The Code
The coding for this project is as below.
https://create.arduino.cc/editor/ponpon0110/e744be18-642d-4c1e-ad41-cb4a56003c70/preview
Finished
You are now down, congrats.