PropWare
C++ objects and CMake build system for Parallax Propeller
Home
Download
Getting Started
Documentation
Reference
About
Related Links
Namespace List
Class List
File List
Examples
Build System
File List
File Members
propsideworkspace
Learn
Examples
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
}
abdrive.h
This library takes care of encoder monitoring and servo signalling, and provides a simple set of func...
main
int main(void)
Definition:
GraphicsTest.c:20
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, and makes causes the wheel to roll 3.25 mm.
Definition:
abdrive.c:417
Generated on Sat Aug 27 2016 00:58:03 for PropWare by
1.8.12