PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Simple Libraries
Motor
libservo
libservo.c
1
/*
2
* @file libservo.c
3
*
4
* @author Andy Lindsay
5
*
6
* @copyright
7
* Copyright (C) Parallax, Inc. 2013. All Rights MIT Licensed.
8
*
9
* @brief Project and test harness for the servo library for standard servos.
10
*/
11
12
void
pulse_outCtr(
int
pin,
int
time);
13
14
#include "
servo.h
"
15
//#include "servoAux.h"
16
#include "
simpletools.h
"
17
18
int
main
()
19
{
20
servo_angle
(0, 0);
21
servo_angle
(1, 100);
22
servo_angle
(2, 200);
23
servo_angle
(3, 300);
24
servo_angle
(4, 400);
25
servo_angle
(5, 500);
26
servo_angle
(6, 600);
27
servo_angle
(7, 700);
28
servo_angle
(8, 800);
29
servo_angle
(9, 900);
30
servo_angle
(10, 1000);
31
servo_angle
(11, 1100);
32
servo_angle
(12, 1200);
33
servo_angle
(13, 1300);
34
/*
35
*/
36
//servo_speed(14, 0);
37
//servo_speed(15, 0);
38
}
servo_angle
int servo_angle(int pin, int degreeTenths)
Set Parallax Standard Servo to angle from 0 to 180 in tenths of a degree.
Definition:
servo.c:45
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....
main
int main(void)
Definition:
GraphicsTest.c:20
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17