ok
Dependencies: mbed
main.cpp
- Committer:
- DeanArm7
- Date:
- 2017-11-28
- Revision:
- 0:0302f3c057c9
- Child:
- 1:0260e05c8e83
File content as of revision 0:0302f3c057c9:
#include "mbed.h" DigitalOut myled1(LED1); DigitalOut myled2(LED2); AnalogIn tempin(p17); int main() { myled1 = 0; myled2 = 0; while(1) { wait(0.5); if(tempin > 0.34f){ //going above 1.07V myled1 = 0; myled2 = 1; } if(tempin < 0.34f){ //going below 1.07V myled1 = 1; myled2 = 0; } } }