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:
- mbedAustin
- Date:
- 2014-09-21
- Revision:
- 2:aae9d053cb5d
- Parent:
- 0:ea5527eaa968
- Child:
- 3:e36e651ab7f2
File content as of revision 2:aae9d053cb5d:
#include "mbed.h"
AnalogIn ain(p19);
DigitalOut led(LED1);
// Turn on led if analog voltage > 30% of supply voltage
int main() {
while (1){
if(ain > 0.3) {
led = 1;
} else {
led = 0;
}
}
}