-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgps_example.ic
More file actions
38 lines (29 loc) · 937 Bytes
/
gps_example.ic
File metadata and controls
38 lines (29 loc) · 937 Bytes
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
//Ryan Hartlage, Pat Wensing 2008-2010
#use "gps_module.lis"
int main()
{
//GPS region
int reg;
//Initialize the GPS module (Requires unplugging of the serial cable)
//Select region with knob
gps_initialize_knob();
beep();
/* Add code to detect the start */
/* light in place below. */
/* Begin start light code */
printf("Wait on Start LtPress Start\n");
start_press();
/* End start light code */
// Call once match has begun
gps_enable();
printf("Waiting for GPS data\n");
while(1==1)
{
//Wait for data
while(!gps_get_data());
//Beep to let us know that we got new data
beep();
//Print out gps variables
printf("%d %d %d %d %d\n", gps_x, gps_y, gps_heading, gps_button, gps_bin);
}
}