-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathowitest.c
76 lines (63 loc) · 1.19 KB
/
owitest.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
* OWI Edge Robotic Arm Controller
*
* Harold Lee
* harold@hotelling.net
*
* Based on the code found at:
* http://notbrainsurgery.livejournal.com/38622.html
*
*/
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <string.h>
#include <unistd.h>
#include "libowi.h"
int main(int argc, char **argv)
{
printf("Running test...\n");
owi_init();
printf("owi_base_clockwise\n");
owi_base_clockwise();
sleep(1);
owi_base_off();
printf("owi_base_counterclockwise\n");
owi_base_counterclockwise();
sleep(1);
owi_base_off();
printf("owi_m4_forward\n");
owi_m4_forward();
sleep(1);
owi_m4_off();
printf("owi_m4_reverse\n");
owi_m4_reverse();
sleep(1);
owi_m4_off();
printf("owi_m3_forward\n");
owi_m3_forward();
sleep(1);
owi_m3_off();
printf("owi_m3_reverse\n");
owi_m3_reverse();
sleep(1);
owi_m3_off();
printf("owi_m2_forward\n");
owi_m2_forward();
sleep(1);
owi_m2_off();
printf("owi_m2_reverse\n");
owi_m2_reverse();
sleep(1);
owi_m2_off();
printf("owi_m1_close\n");
owi_m1_close();
sleep(1);
owi_m1_off();
printf("owi_m1_open\n");
owi_m1_open();
sleep(1);
owi_m1_off();
owi_shutdown();
return 0;
}