-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
38 lines (35 loc) · 856 Bytes
/
main.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
/*
* File: main.c
* Author: Justin Mok - Independence High School
* Last Modified: Thu, Aug 29, 2019
* Description: Main file providing functionality used in the program
*
*/
#include <kipr/botball.h>
#include "hardwaretest.c"
int main() {
/* Welcome message */
print('Hardware Test Rewrite', 'IDLE');
while (1) {
if (DIGITAL0) {
/* Change motor/servo port */
changePort();
}
else if (DIGITAL1) {
/* Move motor/servo up */
moveUp();
}
else if (DIGITAL2) {
/* Move motor/servo down */
moveDown();
}
else if (LBTN) {
/* Switch from motor to servo */
switchInterface();
}
else if (RBTN) {
/* Change speed */
changeSpeed();
}
}
}