Basketball Machine

by edisonho0325 in Circuits > Arduino

216 Views, 0 Favorites, 0 Comments

Basketball Machine

Arduino Basketball Machine
IMG_1227.jpg

During quarantine time, I spend most of my time watching youtube and playing video games. Later I notice that the blue-ray has damaged my eye. So then I decided to make a basketball machine for me to play. To make the basketball machine harder, I added a clapboard that may block my shot. With this machine, I wish that I would spend less time playing with my phone.

Material

Screen Shot 2020-05-27 at 7.32.42 PM.png
Screen Shot 2020-05-27 at 7.32.26 PM.png

Arduino Leonardo

Long Jumper Wires Male to Female

Short Jumper Wires Male to Male

Tape/ Clay

Green LED Light

Red LED Light

Ultrasonic sensor

Micro Arduino Servo Motor SG90

Arduino Resistor

Two 38cm*10cm Cardboard

One 39cm*10cm Cardboard

One 45cm*20cm Cardboard

One 38cm*20cm*45cm Cardboard

Breadboard / Welding Gun

Code

Screen Shot 2020-05-27 at 7.34.05 PM.png
Screen Shot 2020-05-27 at 7.34.28 PM.png
Screen Shot 2020-05-27 at 7.34.35 PM.png

Code

You may change the degree of blocker and the time of the blocker by changing the numbers behind the "Servo Pin". You could change the code to make sure that the level fits your skill ability.

The Circuit

Screen Shot 2020-05-26 at 7.21.55 PM.png
Screen Shot 2020-05-27 at 7.36.29 PM.png

1. Plug in all the wires in the pins declared for the coding part.

2. Be aware of the positive and negative electrode or else the components might break (positive electrode: 5V, negative electrode: GND).

3. Begin with the LED light, put your LED light onto a jumping wire. Plug the longer leg on the LED light on to D`pin; the short leg onto the breadboard connect to the Arduino Resister to the negative.

4. Later with Servo Motor, attach the Servo Motor with three jumping wires, that plug the black line to the negative, the red to the positive, and white to D`pin.

5. Last, Ultrasonic sensor. Look closely, there where 4 different places to plug with the sensor. First, plug the 5V onto the positive on, then plug the Tri and Echo on to D`pin. Last, plug the GND on to negative.

Assemble the Components

2020-05-27.jpg
2020-05-27-2.jpg
2020-05-27-3.jpg
2020-05-27-4.jpg
2020-05-27-5.jpg
2020-05-27-6.jpg

In this step, you're going to learn about how to put all your cardboard together to make the machine.

1. There is already two-piece of cardboard attached to the board ( On the side ). Stick one cardboard (38cm*10cm) on each side. Then fold it in after.

2. After, place the 39cm*10cm Cardboard in the middle of the two sides. Make sure to form a slope for the box, so then the ball could roll down.

3. Later, put your Arduino into the box. Make two small holes for the LED light, and carve a small hole in the middle of the slope for the Ultrasonic sensor the detect the ball.

4. Last, attach your Servo Motor with the bak of your box, so it forms the blocking tension.

How It Works

Arduino Basketball Machine

The machine works as you throw your ball into the box. The Ultrasonic sensor will detect your ball and changes the light of LED to tell whether you score or not. On the other hand, Servo Motor also makes to player harder to get the ball in, which makes the game more fun.