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.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 1:b86f099a314a
- Parent:
- 0:0e723924ae7c
- Child:
- 2:a17f7da1ca7c
--- a/main.cpp Fri Jan 18 19:19:37 2019 +0000
+++ b/main.cpp Tue Jan 22 20:14:53 2019 +0000
@@ -1,12 +1,22 @@
#include "mbed.h"
-
-DigitalOut myled(LED1);
+#include <iostream>
+DigitalOut myRled(LED1);
+DigitalOut myBled(LED2);
+AnalogIn PotCheck(PTE20);
int main() {
+ float fPotValue = 0;
while(1) {
- myled = 1;
+ //myRled = 1;
+ //wait(0.2);
+ myRled = 2*fPotValue;
wait(0.2);
- myled = 0;
+ // myBled = 1;
+ //wait(0.2);
+ myBled = 2*fPotValue;
wait(0.2);
+ cout<< "\rI can't do that Carter" << endl;
+ fPotValue = PotCheck.read();
+ cout << fPotValue << endl;
}
}