PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Simple Libraries
Robotics
ActivityBot
libabdrive
ramp.c
1
#include "
abdrive.h
"
2
3
volatile
int
abd_speed[2];
4
5
void
drive_speed
(
int
left,
int
right);
6
7
void
drive_ramp
(
int
left,
int
right)
8
{
9
drive_speed
(left, right);
10
11
while
(1)
12
{
13
int
done = ( (abd_speed[0] > (left - 4)) && (abd_speed[0] < (left + 4)) );
14
done += ( (abd_speed[1] > (right - 4)) && (abd_speed[1] < (right + 4)) );
15
16
if
(done)
return
;
17
pause
(20);
18
}
19
}
20
21
drive_speed
void drive_speed(int left, int right)
Set wheel speeds in encoder ticks per second. An encoder tick is 1/64th of a revolution,...
Definition:
speed.c:138
pause
void pause(int time)
Delay cog from moving on to the next statement for a certain length of time.
Definition:
libws2812.c:125
drive_ramp
void drive_ramp(int left, int right)
This function ramps up to a given speed and blocks execution until the speed is reached....
Definition:
ramp.c:7
abdrive.h
This library takes care of encoder monitoring and servo signaling, and provides a simple set of funct...
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17