Chess Playing Robot

by Builder200 in Circuits > Arduino

254 Views, 1 Favorites, 0 Comments

Chess Playing Robot

image.jpg
Have you ever played a game alone well fear not this robot can play chess with you useing the arduino uno r3 you can make your very own.

Supplies

The supply’s are
3x servos
1 motor controller
2x dc gearbox motors
2x battery packs
A bunch of electronic copenents

Construction

image.jpg
As you can see in the photos for the top I used a stick and put a small gripper and for the sides I use old books what you want to do is glue the motors to the sides of the books once done that you want to glue the stick to the top and along with your gripper then your done

Wiring

image.jpg
I don’t have a wiring diagram so I’ll be used no the photos for the wiring basically for all 3 servos you want to put 5v on 5v on the breadboard and gnd to the Gnds on breadboard for the motors connect 5v and gnd on the battery pack to motors.

Code

#include
Servo servoMain1; // Define our 1st Servo Servo servoMain2; // Define our 2nd Servo Servo servoMain3; // Define our 3rd Servo void setup() { servoMain1.attach(2); // servo1 on digital pin 2 servoMain2.attach(3); // servo2 on digital pin 3 servoMain3.attach(4); // servo3 on digital pin 4 } void loop() { servoMain1.write(0); // Turn Servo1 to 0 degrees servoMain2.write(90); // Turn Servo2 to center position (90 degrees) servoMain3.write(180); // Turn Servo3 180 degrees delay(1000); // Wait 1 second servoMain1.write(180); // Turn Servo1 to 180 degrees servoMain2.write(135); // Turn Servo2 135 degrees servoMain3.write(90); // Turn Servo3 to center position (90 degrees) delay(1000); // Wait 1 second } // C++ code // void setup() { pinMode(10, OUTPUT); pinMode(12, OUTPUT); }

void loop() { digitalWrite(10, HIGH); digitalWrite(12, HIGH); delay(5000); // Wait for 5000 millisecond(s) digitalWrite(10, LOW); digitalWrite(12, LOW); delay(5000); // Wait for 5000 millisecond(s)

sorry its a mess and its not the full thing