Edward Eastham / Mbed 2 deprecated project7

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
emeastham
Date:
Fri Nov 29 13:35:22 2019 +0000
Parent:
0:c29828af57a5
Commit message:

Changed in this revision

project7.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/project7.cpp	Mon Nov 25 14:40:43 2019 +0000
+++ b/project7.cpp	Fri Nov 29 13:35:22 2019 +0000
@@ -2,6 +2,7 @@
 
 AnalogIn LDR(A0);
 PwmOut LED(A6);
+DigitalOut led2(D12);
 InterruptIn button(A2);
 
 volatile bool state=1;
@@ -19,8 +20,8 @@
 
         meas_r=LDR.read(); 
         meas_v=((meas_r-0.007f)/0.96f);
-        printf("measure = %f = %.0f mV\n", meas_v);
-        
+        printf("measure = %f = %.0f mV\n", meas_r, meas_v);
+        led2.write(state);
             if (state==1){
             if (meas_v>0.05f){