PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Examples
Robots
ActivityBot
Center Servos.c
1
/*
2
Center Servos.c
3
4
This program can be run if ActivityBot Display Calibration shows that one of
5
the servos has a zero Encoder Ticks/Second that's more than +/- 30 from
6
the zero in the Servo Drive column.
7
8
This program sends a 1500 us pulses to the left and right servos. With the
9
PWR switch set to 2, adjust the servos to stay still in in response to these
10
signals by using a Philips screwdriver to turn the potentiometer adjusting
11
screw under the hole in the case adjacent to the servo’s cable.
12
13
IMPORTANT: After both servos have been adjusted, repeat the procedure in
14
http://learn.parallax.com/activitybot/calibrate-your-activitybot
15
*/
16
17
#include "
simpletools.h
"
18
#include "
servo.h
"
19
20
int
main
()
21
{
22
servo_set
(13, 1500);
23
servo_set
(12, 1500);
24
25
print
(
"Use a screwdriver to adjust ActivityBot's servos\n"
);
26
print
(
"to stop with PWR set to 2.\n\n"
);
27
print
(
"Then, make sure to follow the procedure on\n"
);
28
print
(
"http://learn.parallax.com/activitybot/calibrate-your-activitybot.\n"
);
29
}
30
31
simpletools.h
This library provides convenient functions for a variety of microcontroller I/O, timing,...
servo.h
Control up to 14 servos in another core. For up to 28, add the servoAux library to your project....
print
int print(const char *format,...) __attribute__((format(printf
Print format "..." args to the default simple terminal device. The output is limited to 256 bytes.
main
int main(void)
Definition:
GraphicsTest.c:20
servo_set
int servo_set(int pin, int time)
Sets servo control signal to servo connected to a given pin for microsecond pulse durations.
Definition:
servo.c:57
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17