PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Examples
Robots
Arlo
Arlo - Test Activity Board and DHB-10 Communication.c
1
/*
2
Arlo - Test Activity Board and DHB-10 Communication.c
3
4
Run this program to verify that your Activity Board and DHB-10 are communicating.
5
6
Should display:
7
Hardware
8
HWVER = 1
9
Firmware
10
VER = 10
11
12
If it instead displays:
13
"ERROR, no reply from DHB..."
14
It means there is a wiring problem.
15
*/
16
17
#include "
simpletools.h
"
// Include simple tools
18
#include "arlodrive.h"
// Include arlo drive
19
20
char
*s;
21
22
int
main
()
// Main function
23
{
24
freqout
(4, 2000, 3000);
// Beep -> program starting
25
print
(
"Program running...\n"
);
// Program running msg
26
s = dhb10_com(
"HWVER\r"
);
// Request hardware version
27
print
(
"Hardware\n HWVER = %s"
, s);
// Display reply
28
s = dhb10_com(
"VER\r"
);
// Request firmware version
29
print
(
"Firmware\n VER = %s"
, s);
// Display reply
30
}
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
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