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 TextLCD keypad
Revision 0:9b646298bdc9, committed 2019-01-30
- Comitter:
- reyno1jk
- Date:
- Wed Jan 30 02:34:25 2019 +0000
- Child:
- 1:c57c18e1ca87
- Commit message:
- working on for senior design
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TextLCD.lib Wed Jan 30 02:34:25 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/simon/code/TextLCD/#308d188a2d3a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/keypad.lib Wed Jan 30 02:34:25 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/yoonghm/code/keypad/#da060f8c03e8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/keypadandlc.cpp Wed Jan 30 02:34:25 2019 +0000
@@ -0,0 +1,31 @@
+#include "TextLCD.h"
+#include "mbed.h"
+#include "Keypad.h"
+#include <string>
+ // Define your own keypad values
+ char Keytable[] = { '1', '2', '3', 'U', // r0 U = up
+ '4', '5', '6', 'D', // r1 D = down
+ '7', '8', '9', 'S', // r2 S = 2nd
+ 'C', '0', ',', 'E' // r3 C = clear, E = enter
+ };
+ // c0 c1 c2 c3
+
+ uint32_t Index;
+
+ uint32_t cbAfterInput(uint32_t index) {
+ Index = index;
+ return 0;
+ }
+
+ int main() {
+ // r0 r1 r2 r3 c0 c1 c2 c3
+ Keypad keypad(D0, D1, D2, D3, D10, D11, D12, D13);
+ keypad.attach(&cbAfterInput);
+ keypad.start(); // energize the keypad via c0-c3
+
+ while (1) {
+ __wfi();
+ printf("Interrupted\r\n");
+ printf("Index:%d => Key:%c\r\n", Index, Keytable[Index]);
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Jan 30 02:34:25 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/3a7713b1edbc \ No newline at end of file