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
Fork of HelloWorld by
Diff: main.cpp
- Revision:
- 2:eaad066291b6
- Parent:
- 0:fb6bbc10ffa0
--- a/main.cpp Sun Jan 01 20:57:57 2012 +0000
+++ b/main.cpp Fri Oct 17 11:42:31 2014 +0000
@@ -1,12 +1,13 @@
-#include "mbed.h"
-
-DigitalOut myled(LED1);
-
-int main() {
- while(1) {
- myled = 1;
- wait(0.2);
- myled = 0;
- wait(0.2);
- }
-}
+#include "mbed.h"
+DigitalOut LR(p18);
+DigitalIn B1(p20);
+int main() {
+LR = 0;
+ while (1) {
+ while (B1 != 1) /* empty loop */;
+ wait(0.2);
+ LR = 1; /* Når lampa er på */;
+ wait(0.2);
+ LR = 0;
+ }
+ }
\ No newline at end of file
