essai

Dependencies:   microbit

Fork of microbit-hello-world by micro:bit

Files at this revision

API Documentation at this revision

Comitter:
julienlaunay
Date:
Mon Nov 27 18:29:18 2017 +0000
Parent:
0:0041f35b0c4c
Commit message:
essai

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 0041f35b0c4c -r 4a1fd1a4e413 main.cpp
--- a/main.cpp	Wed Jul 13 16:03:21 2016 +0100
+++ b/main.cpp	Mon Nov 27 18:29:18 2017 +0000
@@ -25,19 +25,13 @@
 
 #include "MicroBit.h"
 
-MicroBit uBit;
+ MicroBitStorage storage; 
+ MicroBitThermometer thermometer(storage); 
+MicroBitDisplay display;
 
 int main()
 {
-    // Initialise the micro:bit runtime.
-    uBit.init();
-
-    // Insert your code here!
-    uBit.display.scroll("HELLO WORLD! :)");
-
-    // If main exits, there may still be other fibers running or registered event handlers etc.
-    // Simply release this fiber, which will mean we enter the scheduler. Worse case, we then
-    // sit in the idle task forever, in a power efficient sleep.
-    release_fiber();
-}
-
+    thermometer.setOffset(3);
+    while(1)
+        display.scroll(thermometer.getTemperature());
+}
\ No newline at end of file