Carnival ball game using Arduino
INTRODUCTION We have all played the evergreen carnival games, who doesn't love them?! Now you can flaunt your skills among your friends by presenting an unmatched ball game. This blog has everything you need to do! ABOUT THIS PROJECT In this unbeatable game we control the motor on which the pinion and rack is placed using Ultrasonic sensors. As the ball approaches the sensors it detects it and makes the motor to rotate which displaces the rack on which the cup is placed, so that the ball never hits the cup. COMPONENTS REQUIRED: Arduino UNO DC Motor Rack and pinion Motor driver Ultrasonic sensors How it looks; CODE: #define trigPin1 2 #define echoPin1 3 #define trigPin2 5 #define echoPin2 4 const int motorPin1 = 6; // Pin 14 of L293 const int motorPin2 = 7; // Pin 10 of L293 long duration, distance, RightSensor,LeftSensor; void setup() { Serial.begin (9600); pinMode(trigPin1, OUTPUT); pinMode(echoPin1, INPUT); pinMode(trigPin2, OUTPUT); p...