Beruflich Dokumente
Kultur Dokumente
--H Bridge
Control of motor
The rotation of shaft (clockwise or anti clockwise)
H-Bridge
H-Bridge
H-Bridge
Driver
Motion table
Motor A(left) Motor B(right) Motion
Clockwise
Clockwise
Forward
Clockwise
Anticlockwise
Anticlockwise
Clockwise
Clockwise
stop
right turn
Stop
Anticlockwise
left turn
anticlockwise
Anticlockwise
reverse
stop
stop
stop
Robot Shield
void front(int del){ digitalWrite(motor1Pin1, LOW); digitalWrite(motor1Pin2, HIGH); digitalWrite(motor2Pin1, LOW); digitalWrite(motor2Pin2, HIGH); } void left(int del){ digitalWrite(motor1Pin1, LOW); digitalWrite(motor1Pin2, HIGH); digitalWrite(motor2Pin1, HIGH); digitalWrite(motor2Pin2, LOW); }
void stopRobot(int del){ digitalWrite(motor1Pin1, HIGH); digitalWrite(motor1Pin2, HIGH); digitalWrite(motor2Pin1, HIGH); digitalWrite(motor2Pin2, HIGH); }
void right(int del){ digitalWrite(motor1Pin1, HIGH); digitalWrite(motor1Pin2, LOW); digitalWrite(motor2Pin1, LOW); digitalWrite(motor2Pin2, HIGH); } void back(int del){ digitalWrite(motor1Pin1, HIGH); digitalWrite(motor1Pin2, LOW); digitalWrite(motor2Pin1, HIGH); digitalWrite(motor2Pin2, LOW); }
Remote control robots!!!!! wireless and wired control lets control by keyboard code for the control of robot: o w => forward o a => left turn o s => stop o d => right turn o any other key => stop