School project.
Dependencies: Timezone NTPClient BSP_DISCO_F746NG Grove_temperature
Diff: main.cpp
- Revision:
- 11:f3e516401328
- Parent:
- 10:137cf2c92871
- Child:
- 12:50b76050d163
--- a/main.cpp Fri Jan 15 09:27:26 2021 +0000 +++ b/main.cpp Mon Jan 18 07:40:54 2021 +0000 @@ -5,8 +5,9 @@ @date January 13, 2021 @brief Light Control System to automatically dimmer or increase light levels @section Libraries used - +mbed-os version 6.6.0 BSP_DISCO_F746NG, revision 13:85dbcff by Team ST +Grove_temperature, v1.0.0 by Toyomasa Watarai @section Recommended hardware STM32F746G-DISCOVERY @@ -20,11 +21,12 @@ */ #include "mbed.h" +#include "Grove_temperature.h" AnalogIn light_sensor(A0); AnalogIn rotary(A1); PwmOut led(D3); - +Grove_temperature temp(A2); char building[31]; char room[31]; @@ -51,10 +53,18 @@ float rotary_reading; while(1) { + /** Code for testing temperature sensor + 1/18/2021 - Working + */ + /** + printf("Current temperatur is: %2.2f\n", temp.getTemperature()); + wait_us(1000000); + */ + /** 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);