3 key touch panel from Seeed
Fork of Seeed_Grove_I2C_Touch_Example by
Diff: main.cpp
- Revision:
- 5:50d9e7608cf0
- Parent:
- 3:81ea1b6e3fea
- Child:
- 8:59e43faffe44
--- a/main.cpp Thu Jun 29 16:34:36 2017 +0000 +++ b/main.cpp Thu Jun 29 10:40:14 2017 -0600 @@ -5,17 +5,17 @@ I2C i2c(D14, D15); MPR121 touch_pad(i2c, MPR121::ADDR_VSS); -int main() -{ +int main() +{ uint16_t button_val = 0; - + touch_pad.init(); touch_pad.enable(); - + while(1) { button_val = touch_pad.buttonPressed(); printf("button = 0x%04x\n", button_val); - wait(0.1f); + Thread::wait(100); } }