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
Revision 0:e0f971cdb0ae, committed 2019-10-01
- Comitter:
- mridley
- Date:
- Tue Oct 01 15:11:04 2019 +0000
- Commit message:
- ex 4
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r e0f971cdb0ae main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Tue Oct 01 15:11:04 2019 +0000
@@ -0,0 +1,14 @@
+#include "mbed.h"
+
+DigitalOut myled(LED1);//use on board LED1
+DigitalIn switchstate(p17);// pin17
+
+int main() {
+ while(1) { // repeat indefinetly
+ if (switchstate.read()) //if switch is "HI"
+ myled = 1; //turn LED1 on
+ wait(0.5); //wait 0.5s
+ myled = 0;// turn LED1 off
+ wait(0.5); // wait 0.5s
+ }
+}
diff -r 000000000000 -r e0f971cdb0ae mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Oct 01 15:11:04 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file