PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Examples
Robots
ActivityBot
Speeds for Navigation.c
1
/*
2
Speeds for Navigation.c
3
4
Navigate by making your ActivityBot go certain speeds for certain amounts
5
of time.
6
7
http://learn.parallax.com/activitybot/set-certain-speeds
8
*/
9
10
11
#include "
simpletools.h
"
// simpletools library
12
#include "
abdrive.h
"
// abdrive library
13
14
int
main
()
15
{
16
drive_speed
(64, 64);
// Forward 64 tps for 2 s
17
pause
(2000);
18
drive_speed
(0, 0);
19
20
drive_speed
(26, 0);
// Turn 26 tps for 1 s
21
pause
(1000);
22
drive_speed
(0, 0);
23
24
drive_speed
(128, 128);
// Forward 128 tps for 1 s
25
pause
(1000);
26
drive_speed
(0, 0);
27
}
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
simpletools.h
This library provides convenient functions for a variety of microcontroller I/O, timing,...
main
int main(void)
Definition:
GraphicsTest.c:20
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