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.
Exercise1.cpp
- Committer:
- m161440
- Date:
- 2014-09-09
- Revision:
- 0:029c836ac188
File content as of revision 0:029c836ac188:
#include "mbed.h"
Serial pc(USBTX, USBRX);
AnalogIn voltage(p20);
int main()
{
pc.baud(921600);
while(1)
{
float v= voltage;
voltage.read();
printf("analog value = %f\n",v);
printf("voltage = %f \n",3.3*v);
wait(.5);
}
}