PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Examples
Robots
Arlo
Speeds for Navigation.c
1
/*
2
Arlo - 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
13
#include "arlodrive.h"
// <- CHANGE abdrive to arlodrive
14
15
int
main
()
16
{
17
drive_speed
(64, 64);
// Forward 64 tps for 2 s
18
pause
(2000);
19
drive_speed
(0, 0);
20
21
drive_speed
(26, 0);
// Turn 26 tps for 1 s
22
pause
(1000);
23
drive_speed
(0, 0);
24
25
drive_speed
(128, 128);
// Forward 128 tps for 1 s
26
pause
(1000);
27
drive_speed
(0, 0);
28
}
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
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17