Bert Gereels
/
Capacitive_Touch
Bert Gereels & Dylan Timmerman
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 #include "mbed.h" 00002 #include "qt1070.h" 00003 #include "i2c_qt1070.h" 00004 00005 DigitalOut myled3(LED3); 00006 DigitalOut myled2(LED2); 00007 DigitalOut myled1(LED1); 00008 00009 using namespace I2cQt1070Device; 00010 int main() { 00011 00012 I2cQt1070 i2cQt1070(p28, p27, 0x36, 100000); 00013 int cycleCounter = 0; 00014 while(1){ 00015 i2cQt1070.check_for_instruction(); 00016 00017 cycleCounter ++; 00018 00019 if(cycleCounter >= 100000){ 00020 myled1 = !myled1; 00021 myled2 = !myled2; 00022 myled3 = !myled3; 00023 cycleCounter = 0; 00024 } 00025 } 00026 }
Generated on Wed Jul 20 2022 03:33:56 by 1.7.2