Glowing Lego Tower Bridge

by Ponponhsin in Circuits > Arduino

139 Views, 0 Favorites, 0 Comments

Glowing Lego Tower Bridge

642771379 037016

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

71SnzjcFP-L._AC_SX679_.jpg
226-2266048_lego-tower-bridge-lego-creator-expert-tower-bridge.png

Buy one set of Lego Tower Bride and build it according to the instructions.

Setting Up the Circuit

S__31572017.jpg
messageImage_1621082196374.jpg

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

S__31563964.jpg
S__31563966.jpg
S__31563967.jpg
S__31572019.jpg
642753320 421440

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

IMG 0600

You are now down, congrats.