sosa Multi
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 #include "mbed.h" 00002 #include "TextLCD.h" 00003 float volt; 00004 TextLCD lcd(p20,p19,p21,p22,p23,p24); //rs,e,d4,d5,d6,d7 00005 AnalogIn ain(p18); 00006 00007 int main() { 00008 while(1) { 00009 volt=3.1*ain.read(); 00010 lcd.locate(0,0); 00011 lcd.printf("El Voltaje es de:"); 00012 lcd.locate(0,1); 00013 lcd.printf("%f",volt); 00014 wait(1); 00015 } 00016 }
Generated on Sun Aug 7 2022 16:18:23 by
1.7.2