Etienne Stransky
/
E_Lecture_GPS_base
mbvn,ldfbjnlb,xcbjdf
Diff: main.cpp
- Revision:
- 0:2bea849b5ba1
diff -r 000000000000 -r 2bea849b5ba1 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sun Jan 27 20:53:46 2019 +0000 @@ -0,0 +1,17 @@ +#include "mbed.h" + +Serial PC(USBTX, USBRX); +Serial GPS(p13,p14); +char a; + +int main() { + GPS.baud(9600); + PC.baud(460800); + + while(1) { + if (GPS.readable()) { // attention PC.readable reste à 1 tant qu'il n'y a pas eu de getc qui vide le buffer + a=GPS.getc(); + PC.printf("%c",a); + } + } +}