PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Simple Libraries
Robotics
Arlo
libarlodrive
drive_servoPins.c
1
#include "
simpletools.h
"
2
#include "arlodrive.h"
3
#include "
fdserial.h
"
4
5
fdserial
*ard_dhb10_arlo;
6
fdserial
*ard_dhb10_terminal;
7
8
int
ard_offset, ard_increment, ard_cycles;
9
10
int
ard_rampStep;
11
int
ard_speedLimit;
12
int
ard_tRampStepPrev;
13
int
ard_speedL, ard_speedR;
14
int
ard_mode;
15
int
ard_feedback;
16
int
ard_servo_pin_L;
17
int
ard_servo_pin_R;
18
int
ard_opened;
19
int
ard_speedAccLim;
20
char
dhb10_reply[DHB10_LEN];
21
int
ard_ramp_interval;
22
23
void
drive_servoPins
(
int
servoPinLeft,
int
servoPinRight)
24
{
25
#ifdef ARLO_DEBUG
26
dprint
(ard_dhb10_terminal,
"drive_servoPins(%d, %d)\n"
, servoPinLeft, servoPinRight);
27
#endif
28
29
if
(ard_opened) drive_close();
30
ard_servo_pin_L = servoPinLeft;
31
ard_servo_pin_R = servoPinRight;
32
drive_open();
33
}
dprint
int dprint(text_t *device, const char *format,...) __attribute__((format(printf
Print format "..." args to the device The output is limited to 256 bytes.
simpletools.h
This library provides convenient functions for a variety of microcontroller I/O, timing,...
text_struct
Structure that contains data used by simple text device libraries.
Definition:
simpletext.h:81
drive_servoPins
void drive_servoPins(int servoPinLeft, int servoPinRight)
Set servo pins to values other than the default P12 for left servo and P13 for right servo....
Definition:
servoPins.c:188
fdserial.h
This library supports creating and managing one or more full duplex serial connections with periphera...
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17