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 wave_player mbed-rtos C12832_lcd 4DGL-uLCD-SE LCD_fonts SDFileSystem
Revision 17:13e45fdcf0b0, committed 2019-12-06
- Comitter:
- ShelbyC22
- Date:
- Fri Dec 06 03:44:10 2019 +0000
- Parent:
- 16:13b65f6139be
- Child:
- 20:7d56cdcbc9a5
- Commit message:
- fixed touch keypad code;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Dec 06 03:10:34 2019 +0000
+++ b/main.cpp Fri Dec 06 03:44:10 2019 +0000
@@ -52,6 +52,11 @@
int i=0;
int value=mpr121.read(0x00);
value +=mpr121.read(0x01)<<8;
+ for (i=0; i<12; i++) {
+ if (((value>>i)&0x01)==1) {
+ key_code=i+1;
+ }
+ }
}
wave_player waver(&DACout);
@@ -157,6 +162,8 @@
}
int main() {
+ interrupt.fall(&fallInterrupt);
+ interrupt.mode(PullUp); //for touch keypad
lcd_mutex.lock();
uLCD.baudrate(3000000);
uLCD.cls();
