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.
main.cpp
00001 #include "stdafx.h" 00002 00003 TextLCD lcd(PTC7,PTC0,PTC3,PTC4,PTC5,PTC6); 00004 AnalogIn temp_sen(A0); 00005 AnalogIn light_sen(A1); 00006 PwmOut pwm(PTE20); 00007 PwmOut led_o(PTB18); 00008 Serial mobile(PTE22, PTE23); 00009 DigitalIn enter(D8); 00010 DigitalIn down(D9); 00011 DigitalIn up(D10); 00012 DigitalIn back(D11); 00013 00014 00015 int state = 0; 00016 int type = 0; 00017 int low = 16; 00018 int high = 32; 00019 int bl_vl = 1; 00020 int fanLevel_man = 3; 00021 int lightLevel_man = 2; 00022 int temp_measure; 00023 int fanLevel_dis; 00024 int lightLevel_dis; 00025 int point = 0; 00026 bool modeStatus = true; 00027 00028 int main() 00029 { 00030 while(1) { 00031 //modeProcess(); 00032 if (state == 0) { 00033 mainScreen(); 00034 mobile.printf("%i,%i,%i\n",temp_measure,fanLevel_dis,lightLevel_dis); 00035 //mobile.printf("%i",temp_measure); 00036 } 00037 if (state == 1) { 00038 optionScreen(); 00039 } 00040 if (state == 2) { 00041 temperatureScreen(); 00042 } 00043 if (state == 3) { 00044 lightScreen(); 00045 } 00046 if (state == 4) { 00047 fanScreen(); 00048 } 00049 if (state == 5) { 00050 modeScreen(); 00051 } 00052 } 00053 } 00054
Generated on Sun Jul 17 2022 17:44:48 by
1.7.2