Alberto Piganti
/
blip_piano
miniblip USB piano example
Fork of Fruit_Piano by
Diff: main.cpp
- Revision:
- 1:93bbcf91f356
- Parent:
- 0:4755a81efb1d
- Child:
- 2:1cb69f19f49c
--- a/main.cpp Mon May 26 08:03:17 2014 +0000 +++ b/main.cpp Mon Aug 18 01:58:34 2014 +0000 @@ -10,11 +10,11 @@ Ticker tick; USBKeyboard keyboard; -uint8_t key_map[TOUCH_N] = {RIGHT_ARROW, LEFT_ARROW, DOWN_ARROW, UP_ARROW, ' ', '\n'}; -PinName touch_pin[TOUCH_N] = {A0, A1, A2, A3, A4, A5}; +uint8_t key_map[] = {'a', 'f', 'd', 'g', 'd', 'h', 'j', 'k', 'l', ';', '\'', '\n'}; +PinName touch_pin[] = {A0, A3, A2, A4, A1, A5}; DigitalInOut *p_touch_io[TOUCH_N]; -uint8_t touch_data[TOUCH_N] = {0, }; +uint16_t touch_data[TOUCH_N] = {0, }; void detect(void) { @@ -55,7 +55,7 @@ p_touch_io[i]->write(1); } - tick.attach(detect, 1.0 / 64.0); + tick.attach(detect, 1.0 / 40.0); while(1) { // do something