Ivaylo Iltchev / Mbed 2 deprecated GPS_REPEATER

Dependencies:   mbed

Committer:
icis4
Date:
Thu Jan 28 14:29:12 2016 +0000
Revision:
0:6c5376fa6d72
Child:
1:221b87b26f53
Initial

Who changed what in which revision?

UserRevisionLine numberNew contents of line
icis4 0:6c5376fa6d72 1 #include "mbed.h"
icis4 0:6c5376fa6d72 2
icis4 0:6c5376fa6d72 3 //------------------------------------
icis4 0:6c5376fa6d72 4 // Hyperterminal configuration
icis4 0:6c5376fa6d72 5 // 9600 bauds, 8-bit data, no parity
icis4 0:6c5376fa6d72 6 //------------------------------------
icis4 0:6c5376fa6d72 7
icis4 0:6c5376fa6d72 8 Serial pc(SERIAL_TX, SERIAL_RX);
icis4 0:6c5376fa6d72 9 Serial gps(PB_10, PC_5);
icis4 0:6c5376fa6d72 10
icis4 0:6c5376fa6d72 11 int main() {
icis4 0:6c5376fa6d72 12 char buff[512];
icis4 0:6c5376fa6d72 13 pc.baud(4800);
icis4 0:6c5376fa6d72 14 gps.baud(4800);
icis4 0:6c5376fa6d72 15 pc.printf("*** GPS ***\n");
icis4 0:6c5376fa6d72 16 while(1) {
icis4 0:6c5376fa6d72 17 if (gps.readable()){
icis4 0:6c5376fa6d72 18 *buff = gps.getc();
icis4 0:6c5376fa6d72 19 pc.putc(*buff);
icis4 0:6c5376fa6d72 20 }
icis4 0:6c5376fa6d72 21 }
icis4 0:6c5376fa6d72 22 }
icis4 0:6c5376fa6d72 23