mbed-os

Fork of mbed-os by erkin yucel

Committer:
elessair
Date:
Sun Oct 23 15:10:02 2016 +0000
Revision:
0:f269e3021894
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
elessair 0:f269e3021894 1 #include "mbed.h"
elessair 0:f269e3021894 2
elessair 0:f269e3021894 3 DigitalOut out(p5);
elessair 0:f269e3021894 4 #if defined(TARGET_LPC1114)
elessair 0:f269e3021894 5 AnalogIn in(p20);
elessair 0:f269e3021894 6 #else
elessair 0:f269e3021894 7 AnalogIn in(p19);
elessair 0:f269e3021894 8 #endif
elessair 0:f269e3021894 9
elessair 0:f269e3021894 10 int main() {
elessair 0:f269e3021894 11 while(1) {
elessair 0:f269e3021894 12 if(in > 0.5) {
elessair 0:f269e3021894 13 out = !out;
elessair 0:f269e3021894 14 }
elessair 0:f269e3021894 15 }
elessair 0:f269e3021894 16 }