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.
steps.cpp
00001 #include "mbed.h" 00002 #include "steps.h" 00003 #include "LCDs.h" 00004 #include "Decoder.h" 00005 00006 steps::steps(){} 00007 00008 int steps::step1(int v) 00009 { 00010 LCDs c; 00011 Decoder d; 00012 if(v==11){ 00013 c.lcdcmd(0x01); 00014 c.putString("1-> AUTOMATIC 2-> MANUAL"); 00015 return(1); 00016 } 00017 00018 else if(v==21){ 00019 char disp[16]; 00020 int temp = d.checkIn(); 00021 sprintf(disp,"%d",temp*5); 00022 c.lcdcmd(0x01); 00023 c.putString("temperature: "); 00024 c.lcdcmd(0xC0); 00025 c.putString(disp); 00026 c.putString(" C"); 00027 return(2); 00028 } 00029 00030 else if(v==31){ 00031 char disp2[16]; 00032 int temp2 = d.checkIn(); 00033 sprintf(disp2,"%d",temp2*8); 00034 c.lcdcmd(0x01); 00035 c.putString("Soil Moisture: "); 00036 c.lcdcmd(0xC0); 00037 c.putString(disp2); 00038 c.putString(" %"); 00039 return(3); 00040 } 00041 else 00042 { 00043 return(0); 00044 } 00045 } 00046 00047 void steps::automatic(int v2) 00048 { 00049 00050 } 00051 00052 void steps::manual(int v2) 00053 { 00054 00055 }
Generated on Fri Jul 15 2022 03:01:38 by
1.7.2