Bert Gereels
/
Capacitive_Touch
Bert Gereels & Dylan Timmerman
Diff: main.cpp
- Revision:
- 0:620ca2412ef6
diff -r 000000000000 -r 620ca2412ef6 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Dec 14 13:35:53 2016 +0000 @@ -0,0 +1,26 @@ +#include "mbed.h" +#include "qt1070.h" +#include "i2c_qt1070.h" + +DigitalOut myled3(LED3); +DigitalOut myled2(LED2); +DigitalOut myled1(LED1); + +using namespace I2cQt1070Device; +int main() { + + I2cQt1070 i2cQt1070(p28, p27, 0x36, 100000); + int cycleCounter = 0; + while(1){ + i2cQt1070.check_for_instruction(); + + cycleCounter ++; + + if(cycleCounter >= 100000){ + myled1 = !myled1; + myled2 = !myled2; + myled3 = !myled3; + cycleCounter = 0; + } + } +}