![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
ECE 4180 Final
Dependencies: mbed wave_player mbed-rtos C12832_lcd 4DGL-uLCD-SE LCD_fonts SDFileSystem
Diff: main.cpp
- Revision:
- 17:13e45fdcf0b0
- Parent:
- 16:13b65f6139be
- Child:
- 20:7d56cdcbc9a5
--- 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();