Presentation is loading. Please wait.

Presentation is loading. Please wait.

FUN WITH COOL KIT. Kit Purpose Have fun assembling and programming a simple robot – Includes chassis, wheels, motors, motor driver, IR sensor and arduino.

Similar presentations


Presentation on theme: "FUN WITH COOL KIT. Kit Purpose Have fun assembling and programming a simple robot – Includes chassis, wheels, motors, motor driver, IR sensor and arduino."— Presentation transcript:

1 FUN WITH COOL KIT

2 Kit Purpose Have fun assembling and programming a simple robot – Includes chassis, wheels, motors, motor driver, IR sensor and arduino micro controller Batteries and breadboard not included. Will Program the robot to use two motors to move, and use an IR sensor to detect the environment and adjust accordingly. You are limited only by your own imagination and tools.

3 STEPS 1)READ and follow these INSTRUCTIONS. 2)OPEN THE KIT. 1)ASSIDE FROM THE ROBO BATTERIES AND BREADBOARD NOT INCLUDED YOU WILL NEED TO BUY AT LEAST 4xAA BATTERIES

4 3)ASSEMBLE THE ROBO, USING THE INSTRUCTIONS PROVIDED IN THE KIT. (Fairly easy 5-10min) WILL LOOK LIKE THIS

5 4)TEST THE MOTORS USING BATTERIES – DON’T WORRY POLARITY DOES NOT MATTER, YOU SHOULD SEE THE MOTOR SPIN.

6 5) Electrical Connections Connect Arduino, motor driver and motors to the breadboard..

7 Left side only

8 Right side only

9 Program Arduino 1. Install Arduino environment at arduino.cc Downloads Tab, download Arduino 1.0.5 for your OS. 2. Connect the Arduino Board to the cpu, let it install the hardware. 3. Select the tools tab  Board, Select your board 4. Tool tab  Serial Port, Select your Port. 5. Upload the example program provided next pg.

10 Example program (will only work if you connected everything exactly as stated in the slides) after you upload, robo will go forward, then spin right, spin left, reverse, then repeats. int pwA = 5; int pwB = 6; int motoroneAR = 7; //Right Motor //Ain1 int motoroneAL = 4; int motortwoBR = 8; int motortwoBL = 9; //Left Motor int stby = 11; void setup() { pinMode(pwA, OUTPUT); pinMode(pwB, OUTPUT); pinMode(motoroneAR, OUTPUT); pinMode(motoroneAL, OUTPUT); pinMode(motortwoBR, OUTPUT); pinMode(motortwoBL, OUTPUT); pinMode(stby, OUTPUT); Serial.begin(9600); } void loop() { digitalWrite(stby, HIGH); for(int i = 0; i < 4; i++) { Serial.println(i); delay(10); //Forward if(i<1) { analogWrite(pwA,150); analogWrite(pwB,150); digitalWrite(motoroneAR, LOW); //If AR is high, make sure AL is Low. = Clockwise digitalWrite(motoroneAL, HIGH); //If AL High, AR Low = CCW. digitalWrite(motortwoBR, LOW); //If BR is high, make sure BL is Low. = Clockwise digitalWrite(motortwoBL, HIGH); delay(500); } //right if(i>=1 & i <2) { analogWrite(pwA,150); analogWrite(pwB,150); digitalWrite(motoroneAR, HIGH); digitalWrite(motoroneAL, LOW); digitalWrite(motortwoBR, LOW); digitalWrite(motortwoBL, HIGH); delay(500); } //left if(i>=2 & i <3) { analogWrite(pwA,150); analogWrite(pwB,150); digitalWrite(motoroneAR, LOW); digitalWrite(motoroneAL, HIGH); digitalWrite(motortwoBR, HIGH); digitalWrite(motortwoBL, LOW); delay(500); } //reverse if(i>=3) { analogWrite(pwA,150); analogWrite(pwB,150); digitalWrite(motoroneAR, HIGH); digitalWrite(motoroneAL, LOW); digitalWrite(motortwoBR, HIGH); digitalWrite(motortwoBL, LOW); delay(500); } delay(1500); }


Download ppt "FUN WITH COOL KIT. Kit Purpose Have fun assembling and programming a simple robot – Includes chassis, wheels, motors, motor driver, IR sensor and arduino."

Similar presentations


Ads by Google