Keywish Hummer-Bot Instruction Manual page 37

Table of Contents

Advertisement

After installing the steering gear, you can add the ultrasonic module on it. In order to reduce the later
steering angle adjustment, we adjust the steering gear to 90 degrees, and copy the following program to the
compiler environment (you can also directly open the program in the CD), then connect the signal
line(Orange) on steering gear to the 13 IO port on Arduino, After the servo rotates to 90° , we can install the
servo bracket on the servo, and after the installation, we can fix it with screws., the installation is shown in
Fig.3.1.24.
#include <Servo.h>
Servo
myservo;
int
pos
= 90;
void
setup()
{
myservo.attach(13);
}
void
loop()
{
myservo.write(pos);
delay(15);
}
}
// create servo object to control a servo
// variable to store the servo position
// attaches the servo on pin 9 to the servo object
// tell servo to go to position in variable 'pos'
// waits 15ms for the servo to reach the position
34

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Hummer-Bot and is the answer not in the manual?

Related Products for Keywish Hummer-Bot

Table of Contents

Save PDF