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.
Dependencies: mbed
main.cpp
- Committer:
- josedaparte
- Date:
- 2015-11-26
- Revision:
- 0:3baa1aba5c61
File content as of revision 0:3baa1aba5c61:
#include "mbed.h"
#include "AnalogIn.h"
AnalogIn leer(PTC2);
Serial pc(USBTX,USBRX);
int main(void)
{
float voltaje;
uint16_t adcvalue;
pc.baud(115200);
while(1){
adcvalue = leer.read_u16();
voltaje = adcvalue*3.3/65525;
pc.printf("el voltaje es %.2f\r\n", voltaje);
wait(0.8);
}
}