USBUART - IRQ
Dependencies: BufferedSerial MODSERIAL ST_401_84MHZ USBDevice mbed
Fork of MPU9250AHRS by
Diff: main.cpp
- Revision:
- 4:cebd240ac324
- Parent:
- 3:423c156187bd
- Child:
- 5:ee1b17f1ac25
--- a/main.cpp Fri Dec 11 00:55:22 2015 +0000 +++ b/main.cpp Fri Dec 11 01:20:59 2015 +0000 @@ -30,6 +30,7 @@ //F401_init84 myinit(0); #include "mbed.h" #include "MPU9250.h" +#include "BufferedSerial.h" //#include "N5110.h" // Using NOKIA 5110 monochrome 84 x 48 pixel display @@ -58,6 +59,7 @@ int main() { pc.baud(115200); + char ch; //Set up I2C i2c.frequency(400000); // use fast (400 kHz) I2C @@ -68,6 +70,11 @@ //lcd.init(); // lcd.setBrightness(0.05); + while(1){ + ch = pc.getc(); + pc.printf(" %c \r\n", ch); + } + // Read the WHO_AM_I register, this is a good test of communication