PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Examples
Robots
Arlo
Arlo - Test Motor Connections.c
1
/*
2
Arlo - Test Motor Connections.c
3
4
Run this program to verify that your Arlo goes forward.
5
*/
6
7
#include "
simpletools.h
"
// Include simple tools
8
#include "arlodrive.h"
// Include arlo drive
9
10
char
s[48];
11
12
int
main
()
// Main function
13
{
14
freqout
(4, 1000, 3000);
// Beep -> program starting
15
print
(
"Program running...\n"
);
// Program running message
16
drive_feedback
(0);
// Disable encoders
17
drive_speed
(20, 20);
// 20/127 of full power to motors
18
pause
(3000);
// Go for 3 seconds
19
drive_speed
(0, 0);
// Stop
20
print
(
"Program done!\n"
);
// Program done message
21
}
drive_feedback
void drive_feedback(int enabled)
Enables or disables encoder feedback for speed control.
Definition:
feedback.c:5
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
freqout
void freqout(int pin, int msTime, int frequency)
Use same cog to send square wave of a certain frequency for a certain amount of time....
Definition:
freqout.c:10
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,...
print
int print(const char *format,...) __attribute__((format(printf
Print format "..." args to the default simple terminal device. The output is limited to 256 bytes.
main
int main(void)
Definition:
GraphicsTest.c:20
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17