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:
- Snay22
- Date:
- 2016-11-09
- Revision:
- 1:b0fc2c9a5d06
- Parent:
- 0:44fc57e03a56
- Child:
- 4:41bbbaecd322
File content as of revision 1:b0fc2c9a5d06:
#include "mbed.h" AnalogIn ain(A0); Serial pc(USBTX, USBRX); DigitalOut dout(LED1); int main() { pc.baud(9600); pc.printf("Getting values\r\n"); while(1) { if(ain > 0.3f) { dout = 1; } else { dout = 0; } wait(0.1); pc.printf("The value is %f\r\n", ain.read()); } }