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.
Diff: main.cpp
- Revision:
- 0:d5854f722e00
- Child:
- 1:92dd04f0bd52
diff -r 000000000000 -r d5854f722e00 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed May 01 10:37:04 2013 +0000
@@ -0,0 +1,17 @@
+#include "mbed.h"
+
+DigitalOut myled(LED1);
+AnalogIn dis(PTB0);
+
+int main() {
+ while(1) {
+ int per;
+ per=dis*512/3.3;
+ if (per<7){
+ myled=0;
+ }
+ else {
+ myled=1;
+ }
+ }
+}