
LDR
Dependencies: mbed
Diff: main.cpp
- Revision:
- 0:f357437c7ebd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Dec 07 17:57:14 2015 +0000 @@ -0,0 +1,16 @@ +#include "mbed.h" + +AnalogIn LDR(A0); +Serial pc(SERIAL_TX, SERIAL_RX); + +int main() +{ + pc.baud(19200); + pc.printf("Hello\n"); + while (1) + { + float LDR=In.read(); + pc.printf("%f\n",LDR); + wait(1); + } +}