School project.

Dependencies:   Timezone NTPClient BSP_DISCO_F746NG Grove_temperature

Revision:
10:137cf2c92871
Parent:
9:fd1f07a4a0ff
Child:
11:f3e516401328
--- a/main.cpp	Thu Jan 14 14:07:01 2021 +0000
+++ b/main.cpp	Fri Jan 15 09:27:26 2021 +0000
@@ -1,17 +1,22 @@
 /**
-@file main.cpp
-@brief Light Control System to automatically dimmer or increase light levels depending on registered light intensity.
-Made for:
-            STM32F746G-DISCOVERY
-            Grove Base Shield v2.1
-            Grove Light Sensor  v1.2    
-            Grove Rotary Angle Sensor v1.2
-            Grove LED Socket Kit v1.5
-            Grove LED diode
-            Grove Button v1.2
-            
-@author Tu Tri Huynh
-@date 1/13/2021
+******************************************************************************
+@file    main.cpp
+@author  Tu Tri Huynh
+@date    January 13, 2021
+@brief   Light Control System to automatically dimmer or increase light levels
+@section Libraries used
+ 
+BSP_DISCO_F746NG, revision 13:85dbcff by Team ST
+ 
+@section Recommended hardware
+STM32F746G-DISCOVERY
+Grove Base Shield v2.1
+Grove Light Sensor  v1.2    
+Grove Rotary Angle Sensor v1.2
+Grove LED Socket Kit v1.5
+Grove LED diode
+Grove Button v1.2
+******************************************************************************
 */
 
 #include "mbed.h"
@@ -23,7 +28,6 @@
 char building[31];
 char room[31];
 
-/// Used to test the controller and make sure that it functions
 /** DigitalOut myled(LED1); */
 
 #include "helper_functions.h"
@@ -31,13 +35,17 @@
 #include "lcd_functions.h"
 #include "led_functions.h"
 #include "rotary_functions.h"
+#include "sc_functions.h"
 
 
 int main(){
-    /*
+    
     lcd_initialize();
     lcd_show_setup_screen();
-    setup_run_setup();*/
+    setup_run_setup();
+    
+    Thread serial_communication;
+    serial_communication.start(&sc_run_service);
     
     float light_sensor_reading;
     float rotary_reading;
@@ -46,10 +54,12 @@
         /** Code for testing that the rotary can control the LED light blinking 
             1/14/2021 Working
         */
+        /*
         rotary_reading = rotary_reverse_read(rotary);
         printf("%1.2f\n",rotary_reading);
         led_set_blink_rate(rotary_reading);
         wait_us(2000000);
+        */
         
         /** Code for testing if rotary has been turned or not 
             1/14/2021 Working