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
- Committer:
- tanjinamicky
- Date:
- 2018-06-05
- Revision:
- 6:204c63ac705d
- Parent:
- 5:49651a9f8ff7
- Child:
- 8:4573e1a4b4aa
- Child:
- 9:01263bd18141
File content as of revision 6:204c63ac705d:
#include "mbed.h" #include "TextLCD.h" #include <string> #include <iostream> I2C i2c(p28, p27); DigitalOut myled(LED1); DigitalOut myled2(LED2); DigitalOut myled3(LED3); DigitalOut myled4(LED4); AnalogIn Ain(p20); TextLCD lcd(p22, p21, p23, p24, p25, p26); int main() { while(1){ float f = Ain.read(); //Read voltage value float Vin = f *3.3; lcd.printf("%.2f", Vin); lcd.printf("\n"); //myled=1; } }