Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 1:81a67a8d4850, committed 2019-11-29
- 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){