Read the MAX31875 sensor on Thermo 6 Click installed on NuMaker-IoT-M487 board

Dependencies:   MAX31875_Temperature_Sensor_Low_Power

Files at this revision

API Documentation at this revision

Comitter:
morgandu
Date:
Thu Aug 20 02:17:10 2020 +0000
Parent:
0:c40fe84a8d1f
Commit message:
Replace deprecated "wait()" with "ThisThread::wait_for()" to prevent warning and error on MbedOS 5 and 6

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-os.lib Show annotated file Show diff for this revision Revisions of this file
diff -r c40fe84a8d1f -r ab8e1135d0c4 main.cpp
--- a/main.cpp	Tue Apr 16 11:56:19 2019 +0000
+++ b/main.cpp	Thu Aug 20 02:17:10 2020 +0000
@@ -33,9 +33,14 @@
     while(true)
     {
         /* It should wait at least 1/8 seconds for next read */
-        //wait(MAX31875_WAIT_CONV_RATE_8);   
+        //wait(MAX31875_WAIT_CONV_RATE_8);
+           
         /* But to slow print out rate, wait 1 second here */
-        wait(1);
+#if MBED_MAJOR_VERSION >= 6
+        ThisThread::sleep_for(1s);
+#else
+        ThisThread::sleep_for(1000);
+#endif
 
         f_temperature = temp_sensor.read_reg_as_temperature(MAX31875_REG_TEMPERATURE);
         printf("Temperature is %3.4f Celsius, %3.4f Fahrenheit\r\n",
diff -r c40fe84a8d1f -r ab8e1135d0c4 mbed-os.lib
--- a/mbed-os.lib	Tue Apr 16 11:56:19 2019 +0000
+++ b/mbed-os.lib	Thu Aug 20 02:17:10 2020 +0000
@@ -1,1 +1,1 @@
-https://github.com/ARMmbed/mbed-os/#0063e5de32fc575f061244c96ac60c41c07bd2e6
+https://github.com/ARMmbed/mbed-os/#890f0562dc2efb7cf76a5f010b535c2b94bce849