Kees Tijsen / Mbed 2 deprecated GPSXbee_1_1

Dependencies:   Beacon GPS MODSERIAL PowerControl SDFileSystem mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "Beacon.h"
00002 
00003 int main(void){
00004     Beacon Bcn(p9,p10,p13,p14,25,300);
00005     Bcn.L1 = Bcn.init();
00006     while(1){
00007        // Parse GPS data until data is received on XBee serial port
00008        
00009        if (Bcn.xbeeReadable()){
00010           Bcn.parseXbee();
00011           Bcn.L3 = !Bcn.L3;
00012        }
00013        if (Bcn.gpsReadable()){
00014            Bcn.parseGpsData();
00015            Bcn.L2 = !Bcn.L2;
00016        }       
00017     }
00018 }