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.
Fork of lecturaAnaloga by
Diff: main.cpp
- Revision:
- 3:19594b07824c
- Parent:
- 2:7d8925e51f85
--- a/main.cpp Mon Sep 28 22:26:22 2015 +0000 +++ b/main.cpp Mon Sep 28 23:58:26 2015 +0000 @@ -7,15 +7,21 @@ Serial pc(USBTX,USBRX); //puertos del PC AnalogIn Vin(PTC2); TextLCD lcd(PTB10, PTB11, PTE2, PTE3, PTE4, PTE5); // rs, e, d4-d7 +int SalidaAnaloga; +AnalogOut u(PTE30); +float c; + int main( ){ + while(1){ + pc.scanf("%f", &c); + lcd.locate(0,0); + lcd.printf("Volt(%f)", Vin.read()); + lcd.locate(0,1); + lcd.printf("Vout(%f)",c); + pc.printf("%f\n",Vin.read()); + u.write(c); - lcd.cls(); - wait(0.1); - while(1){ - lcd.cls(); - lcd.printf("Volt(%f)", Vin.read()); - pc.printf("%f\n", Vin.read()); wait(0.1); } } \ No newline at end of file