School project.

Dependencies:   Timezone NTPClient BSP_DISCO_F746NG Grove_temperature

Revision:
13:41debc0b9063
Parent:
10:137cf2c92871
Child:
14:3ac7c08dbc52
--- a/sc_functions.h	Mon Jan 18 07:41:31 2021 +0000
+++ b/sc_functions.h	Mon Jan 18 13:39:58 2021 +0000
@@ -22,6 +22,15 @@
     {
         printf("Current rotary position: %1.2f\n", rotary.read());
     }
+    else if (choice == '3')
+    {
+        printf("Current celsius temperature: %2.2f\n", temp.getTemperature());
+    }
+    else if (choice == '4')
+    {
+        float fahrenheit = helper_convert_celsius_to_fahrenheit(temp.getTemperature());
+        printf("Current fahrenheit temperature: %3.2f\n", fahrenheit);
+    }
     else
     {
         printf("Invalid choice.\n");
@@ -44,6 +53,8 @@
     printf("To get data from the sensors, please enter a number and press return.\n");
     printf("Input 1 to get current light intensity.\n");
     printf("Input 2 to get the current position of rotary control button.\n");
+    printf("Input 3 to get the current temperature in celcius.\n");
+    printf("Input 4 to get the current temperature in fahrenheit.\n");
     sc_read_input();
 }