Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
main.cpp
00001 //Defining and Including stuff up here 00002 #include <mbed.h> 00003 #include "SHTx/sht15.hpp" 00004 #define temperature_low //For use in the Data Analysis 00005 #define temperature_high //For use in the Data Analysis 00006 #include "rgb_led.h" //For use in the RGB_LED_output part 00007 #include "7_segment_control.h" //For use in the RGB_LED_output part 00008 00009 // MAIN er ikke færdig rettet!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 00010 00011 00012 //Prototype definitions 00013 void Logging(); //Prototype for Logging 00014 void Hibernation(); 00015 void Settings(); 00016 void Comparevalues(); 00017 void rgb_outp(); 00018 00019 00020 //The correct order of files: 00021 00022 //Declaration of GLOBAL VARIABLES: 00023 float temperature, humidity; //this will be data read from sensor 00024 void GetTemperatureAndHumidity(); 00025 int i,t,set_temp,timespan,status; 00026 00027 Serial pc(USBTX, USBRX); 00028 //DigitalOut busy(LED1); 00029 InterruptIn event(USER_BUTTON); 00030 DigitalOut myled(LED1); 00031 DigitalIn up(PA_5); 00032 DigitalIn down(PA_6); 00033 00034 00035 //ports on the Nucleo: PB_8, PB_9 00036 SHTx::SHT15 sensor(PB_8, PB_9); 00037 00038 00039 00040 int main() 00041 { 00042 00043 Logging(); 00044 00045 Settings(); 00046 00047 GetTemperatureAndHumidity(); //Data Collection 00048 00049 Comparevalues( ); //Data Analysis 00050 00051 rgb_outp(status); //RGB_LED_output 00052 00053 return 0; 00054 }
Generated on Sun Jul 17 2022 23:06:35 by
