ldr blinky
Dependencies: mbed
main.cpp
- Committer:
- 08DyeG
- Date:
- 2014-06-19
- Revision:
- 1:799a74dde023
- Parent:
- 0:1d3ca434d486
File content as of revision 1:799a74dde023:
#include "mbed.h" DigitalOut r(PTC2); DigitalOut g(PTC1); AnalogIn ldr(A3); int main(){ while(1){ if(ldr>0.51){ g=1; r=0; } else if(ldr<0.50){ g=0; r=1; } } }