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 0:4e45225d3044, committed 2020-04-22
- Comitter:
- psug
- Date:
- Wed Apr 22 15:29:23 2020 +0000
- Commit message:
- LAB1
;
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 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Apr 22 15:29:23 2020 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+
+InterruptIn Down(p12);
+InterruptIn Left(p13);
+InterruptIn Center(p14);
+InterruptIn Up(p15);
+InterruptIn Right(p16);
+
+int main(){
+ printf("hello\r\n");
+ while (1) {
+ if (Down==1)
+ printf("Down pressed\r\n");
+ else if (Left==1)
+ printf("Left pressed\r\n");
+ else if (Center==1)
+ printf("Center pressed\r\n");
+ else if (Up==1)
+ printf ("Up pressed\r\n");
+ else if (Right==1)
+ printf ("Right pressed\r\n");
+
+ }
+ }
+
+
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Apr 22 15:29:23 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file