How to make an easy and cheap arduino robot!

0
151

Learn how to create your own arduino robot that can move in any direction, and complete different tasks. No programming, experienced, soldering, or knowledge of robots required to create the bot! WATCH MORE VIDEOS FROM MY CHANEL!

Parts you need to build the robot:
Arduino Uno (cable included): //store-usa.arduino.cc/products/… 25$
Arduino Motor Shield: //bit.ly/1RPO9l4 22$
Motors and/or chassis: //bit.ly/1V2Jiux 20$
Power (optional): //bit.ly/23aMgmC 3$
(you can use any kind of chasis)

Here is the code to move around your robot:

void setup() {

//Setup Channel A
pinMode(12, OUTPUT); //Initiates Motor Channel A pin
pinMode(9, OUTPUT); //Initiates Brake Channel A pin

//Setup Channel B
pinMode(13, OUTPUT); //Initiates Motor Channel A pin
pinMode(8, OUTPUT); //Initiates Brake Channel A pin

}

void loop(){

//Motor A forward @ full speed
digitalWrite(12, HIGH); //Establishes forward direction of Channel A
digitalWrite(9, LOW); //Disengage the Brake for Channel A
analogWrite(3, 255); //Spins the motor on Channel A at full speed

//Motor B backward @ half speed
digitalWrite(13, LOW); //Establishes backward direction of Channel B
digitalWrite(8, LOW); //Disengage the Brake for Channel B
analogWrite(11, 123); //Spins the motor on Channel B at half speed

delay(3000);

digitalWrite(9, HIGH); //Engage the Brake for Channel A
digitalWrite(9, HIGH); //Engage the Brake for Channel B

delay(1000);

//Motor A forward @ full speed
digitalWrite(12, LOW); //Establishes backward direction of Channel A
digitalWrite(9, LOW); //Disengage the Brake for Channel A
analogWrite(3, 123); //Spins the motor on Channel A at half speed

//Motor B forward @ full speed
digitalWrite(13, HIGH); //Establishes forward direction of Channel B
digitalWrite(8, LOW); //Disengage the Brake for Channel B
analogWrite(11, 255); //Spins the motor on Channel B at full speed

delay(3000);

digitalWrite(9, HIGH); //Engage the Brake for Channel A
digitalWrite(9, HIGH); //Engage the Brake for Channel B

delay(1000);

}

Song credits to: Asthmatic Astronaut, and Ghosts
I do not own any of the music in this video I give all credit to the artists above.

source

LEAVE A REPLY

Please enter your comment!
Please enter your name here

13 + 12 =