GPS and IMU reading works

Dependencies:   mbed Servo SDFileSystem

/media/uploads/taoqiuyang/img_2352.jpg

Committer:
taoqiuyang
Date:
Sat Aug 08 06:22:37 2015 +0000
Revision:
0:f4d390c06705
Child:
1:e7245ffb4820
basic serial repeater;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
taoqiuyang 0:f4d390c06705 1 #include "mbed.h"
taoqiuyang 0:f4d390c06705 2
taoqiuyang 0:f4d390c06705 3 Serial pc(USBTX, USBRX); // tx, rx
taoqiuyang 0:f4d390c06705 4 Serial device(p28, p27); // tx, rx
taoqiuyang 0:f4d390c06705 5
taoqiuyang 0:f4d390c06705 6 int main() {
taoqiuyang 0:f4d390c06705 7 device.baud(57600);
taoqiuyang 0:f4d390c06705 8 while(1) {
taoqiuyang 0:f4d390c06705 9 if(pc.readable()) {
taoqiuyang 0:f4d390c06705 10 device.putc(pc.getc());
taoqiuyang 0:f4d390c06705 11 }
taoqiuyang 0:f4d390c06705 12 if(device.readable()) {
taoqiuyang 0:f4d390c06705 13 pc.putc(device.getc());
taoqiuyang 0:f4d390c06705 14 }
taoqiuyang 0:f4d390c06705 15 }
taoqiuyang 0:f4d390c06705 16 }