essai

Dependencies:   microbit

Fork of microbit-hello-world by micro:bit

Revision:
1:4a1fd1a4e413
Parent:
0:0041f35b0c4c
--- 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