Manual
www.nexusrobot.com Robot Kits manual
119
This document describes a car with three servo Motors. On the Introduction, you will know how to control
the servo Motors,then to control the car
Before you read this code,you should know about the Servo Motor Theory.To understand how the motor
works.
*3WD 48mm Omni wheel
*Aluminum alloy fram
*Capable of rotation
*Includes Ultrasonic sensors
*Microcontroller and IO expansion board
*Programmable with C, C++
*Based on Arduino microcontroller
RB014_48mm 3WD Omni Wheel mobile robot kit
The 3WD 48mm Omni wheel mobile robot kit use three omni wheels with drive moving forward,
backward, left, and right without change the direction and speed. Includes microcontroller and motors, it
is programmable. Programming is performed by connecting to your PC and writting programs. There are
still pre-drilled holes of screw and its firm aluminum alloy body makes it convenient and possible to add
more levels.
¾ Simple code
#define MOTOR1_E 9 //define the pin 9 as the motor1’s pwm signal control pin
#define MOTOR2_E 10 //define the pin 10 as the motor2’s pwm signal control pin
#define MOTOR3_E 11 //define the pin 11 as the motor3’s pwm signal control pin
//*************************************************//
void goAhead(){
analogWrite(MOTOR1_E, 48); //stop run motor1
analogWrite(MOTOR2_E, 62); //forward run motor2
analogWrite(MOTOR3_E, 34); // Revese run motor3
}
//*************************************************//
void getBack(){
analogWrite(MOTOR1_E,48); //stop tun motor1
analogWrite(MOTOR2_E,32); // Reverse run motor2
analogWrite(MOTOR3_E,64); //forward run motor3
}
//************************************************//
void Left(){
analogWrite(MOTOR1_E,36); // Reverse run motor1
analogWrite(MOTOR2_E,53); //forward run motor2