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:
- jasminealice
- Date:
- 2018-06-05
- Revision:
- 8:4573e1a4b4aa
- Parent:
- 6:204c63ac705d
- Parent:
- 7:54c528b47ea7
- Child:
- 10:cda57976225f
File content as of revision 8:4573e1a4b4aa:
#include "mbed.h"
#include "TextLCD.h"
#include <string>
#include <iostream>
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;
}
}
