Arduino-LEGO-Claw-Machine

Arduino + LEGO Claw Machine

Description

This is a fun claw machine built with Arduino and LEGO components. You can control the claw using a joystick, grab a toy by pressing a button, and drop it into a box using an ultrasonic sensor. LED lights and a piezo buzzer provide feedback when the toy is successfully dropped.

Features • Control the claw’s movement with a joystick • Grab a toy by pressing a button • Automatic toy release when claw is above the collection box • LED lights flash and piezo buzzer sounds when toy is dropped • Uses ultrasonic sensor to detect claw position above the box

Components • Arduino board • LEGO pieces for the claw and frame • Joystick module • Push button • Ultrasonic sensor • LEDs • Piezo buzzer • servo Motors for claw movement

How It Works 1. Move the claw with the joystick. 2. Press the button to close the claw and grab a toy. 3. Move the claw over the collection box. 4. The ultrasonic sensor detects the claw above the box. 5. The claw opens, LEDs light up, and piezo buzzer sounds. 6. The toy falls into the box, ready to collect!

Setup Instructions 1. Connect all components to the Arduino as per your wiring diagram. 2. Upload the Arduino code to the board. 3. Power the motors and sensors. 4. Test the joystick, button, and claw movements. 5. Place toys in the claw area and enjoy!

Usage • Use the joystick to navigate the claw. • Press the button to pick up a toy. • Move the claw over the box to drop the toy safely.

⸻ unfortunatly i dont have photos of the final version, but this prototype gives a glimse into the build process.

https://github.com/user-attachments/assets/c9e6544e-982c-4559-85d9-f164072bf090

image