A program for the BBC MicroBit that displays temperature and compass headings.

Dependencies:   microbit

Revision:
5:2314ad5e8997
Parent:
4:9146469c80cd
Child:
6:68e29cbd2696
--- a/source/main.cpp	Mon Jul 25 15:11:06 2016 +0000
+++ b/source/main.cpp	Mon Jul 25 15:21:22 2016 +0000
@@ -219,7 +219,9 @@
     uBit.io.P0.isTouched();
     uBit.io.P1.isTouched();
     uBit.io.P2.isTouched();
-
+    // initialise the thermometer
+    int iTemp = uBit.thermometer.getTemperature();
+    uBit.thermometer.setCalibration(iTemp);
     while (true)
     {
     if ( (not(uBit.io.P0.isTouched())) and (not(uBit.io.P1.isTouched())) and (not (uBit.io.P2.isTouched())) )