2221

Dependencies:   mbed

Fork of AVC_gps by AVR Competition

main.cpp

Committer:
Sarahi
Date:
2014-10-09
Revision:
2:fb8c2df6e7e8
Parent:
1:2c7ebb32acda

File content as of revision 2:fb8c2df6e7e8:

#include "mbed.h"

DigitalOut led(LED_GREEN);
Serial gps(PTC17, PTC16);
Serial pc(USBTX, USBRX);


int v = 0;
int main(){
    gps.baud(4800);
    while (true) {
        char str [200];
        char c;
        if (gps.readable()){
            c = gps.getc();
            if (c == '$') {
                c = v;
                gps.scanf ("%199s",str);
                //while (n >= 
            }
        }else{
            //pc.printf("No gps data \n");
        }
        led = !led; // toggle led
        //wait(0.001f);
    }
}