diff --git a/README.md b/README.md index c9d34e1..50ca4e0 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ pip install -U platformio platformio run -t upload && platformio device monitor -b 115200 ``` -* Convert mp3 files: `sox ~/Music/input.mp3 -c 1 -r 11025 output.wav trim 0 30` +* Convert mp3 files: `sox ~/Music/input.mp3 -c 1 -r 11025 -b 16 output.wav trim 0 30` * SD card is tested with one FAT16 partion ## ToDo diff --git a/src/keyboard.cpp b/src/keyboard.cpp index c979099..7e5348e 100644 --- a/src/keyboard.cpp +++ b/src/keyboard.cpp @@ -37,6 +37,8 @@ static void tp_example_rtc_intr(void *arg) { } bool Keyboard::getTouchDetected(uint8_t pad) { + if (pad==8) pad=9; // fix hardware wiring + if (pad==1) pad=8; bool res = s_pad_activated[pad]; s_pad_activated[pad] = false; return res; diff --git a/src/main.cpp b/src/main.cpp index c0c21b5..96c0175 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -54,7 +54,8 @@ void loop() for(int i=0; i<=9; i++) { if (keyboard.getTouchDetected(i) == true) { touched = true; - Serial.println("touch"); + Serial.print("touch "); + Serial.println(i, DEC); if (sound.playing == false) { Serial.println("new task"); xTaskCreate(&(Sound::buffer_refill_task), "buffer_refill_task", 4096, (void*)soundFile[i/3][i%3], 5, &xTaskSound);