School project.

Dependencies:   Timezone NTPClient BSP_DISCO_F746NG Grove_temperature

Committer:
tuxx0046
Date:
Wed Jan 13 13:53:02 2021 +0000
Revision:
4:1a12157689a7
Parent:
3:02e7aac23ff9
Child:
6:aecab8e3acad
Visual feedback on display added to the serial communication setup part.; Can now see the inputted building and room on display after setup.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tuxx0046 1:1ee11539cc43 1 /**
tuxx0046 0:ed4063a0a4d5 2 @file main.cpp
tuxx0046 0:ed4063a0a4d5 3 @brief Light Control System to automatically dimmer or increase light levels depending on registered light intensity.
tuxx0046 4:1a12157689a7 4 Made for STM32F746G-DISCOVERY
tuxx0046 0:ed4063a0a4d5 5
tuxx0046 0:ed4063a0a4d5 6 @author Tu Tri Huynh
tuxx0046 0:ed4063a0a4d5 7
tuxx0046 0:ed4063a0a4d5 8 @date 1/13/2021
tuxx0046 0:ed4063a0a4d5 9 */
tuxx0046 0:ed4063a0a4d5 10
tuxx0046 0:ed4063a0a4d5 11 #include "mbed.h"
tuxx0046 2:90d31841523a 12 /// These are global variables and declared before most other things
tuxx0046 0:ed4063a0a4d5 13 char building[31];
tuxx0046 0:ed4063a0a4d5 14 char room[31];
tuxx0046 0:ed4063a0a4d5 15
tuxx0046 2:90d31841523a 16 /// Used to test the controller and make sure that it functions
tuxx0046 2:90d31841523a 17 DigitalOut myled(LED1);
tuxx0046 0:ed4063a0a4d5 18
tuxx0046 3:02e7aac23ff9 19 #include "setup_functions.h"
tuxx0046 4:1a12157689a7 20 #include "lcd_functions.h"
tuxx0046 2:90d31841523a 21
tuxx0046 0:ed4063a0a4d5 22
tuxx0046 0:ed4063a0a4d5 23
tuxx0046 0:ed4063a0a4d5 24 int main(){
tuxx0046 0:ed4063a0a4d5 25 /*
tuxx0046 0:ed4063a0a4d5 26 printf("Mbed OS version: %d,%d,%d\n\n",MBED_MAJOR_VERSION, MBED_MINOR_VERSION, MBED_PATCH_VERSION);
tuxx0046 0:ed4063a0a4d5 27 */
tuxx0046 4:1a12157689a7 28 lcd_initialize();
tuxx0046 4:1a12157689a7 29 lcd_show_setup_screen();
tuxx0046 2:90d31841523a 30 setup_run_setup();
tuxx0046 2:90d31841523a 31 while(1)
tuxx0046 2:90d31841523a 32 {
tuxx0046 4:1a12157689a7 33
tuxx0046 4:1a12157689a7 34
tuxx0046 2:90d31841523a 35 /** 01/13/2021 Used to test the controller and make sure that it functions.*/
tuxx0046 2:90d31841523a 36 /**
tuxx0046 2:90d31841523a 37 printf("This is a test.\n");
tuxx0046 2:90d31841523a 38 myled = 1;
tuxx0046 2:90d31841523a 39 wait_us(1000000);
tuxx0046 2:90d31841523a 40 myled = 0;
tuxx0046 2:90d31841523a 41 wait_us(1000000);
tuxx0046 2:90d31841523a 42 */
tuxx0046 2:90d31841523a 43 }
tuxx0046 0:ed4063a0a4d5 44 }