Sends compass and accelerometer data, receives data and displays on LED matrix

Dependencies:   microbit

Files at this revision

API Documentation at this revision

Comitter:
kinga
Date:
Mon Feb 20 09:33:31 2017 +0000
Parent:
1:17905d919813
Child:
3:5567512e8de7
Child:
6:e316416cae08
Commit message:
readData returns int;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Feb 20 09:12:41 2017 +0000
+++ b/main.cpp	Mon Feb 20 09:33:31 2017 +0000
@@ -32,7 +32,7 @@
     return getCompassHeading() + getAccelerometerVectors();
 }
 
-ManagedString readData()
+int readData()
 {
     return serial.read(2, ASYNC);
 }
@@ -60,7 +60,7 @@
     //ManagedString buffer = "";
     while(1)
     {   
-        const char* temp = readData();
+        //const char* temp = readData();
         //temp = readData();
         //buffer = readData();
         //myLedMatrix.setLedMatrix(temp / 10, temp % 10);