Wouter Van den Bogaert
/
PGO6_VoteController_template
PGO6
Diff: main.cpp
- Revision:
- 3:14b20a4f36d0
- Parent:
- 2:5b7d055dbc91
- Child:
- 4:15e7cac255da
--- a/main.cpp Tue Oct 31 09:01:56 2017 +0000 +++ b/main.cpp Mon Oct 28 16:35:27 2019 +0000 @@ -8,9 +8,10 @@ #include "MQTTNetwork.h" #include "MQTTmbed.h" #include "MQTTClient.h" +#include "mbed.h" char* topic; - +Serial pc(USBTX, USBRX); /** TODO ---- @@ -43,6 +44,19 @@ int main(int argc, char* argv[]) { - + + InterruptIn button(USER_BUTTON); + button.fall(callback(button1_onpressed_cb)); + multiclick_state = 0; + pc.printf("Print print \n"); + while(true){ + + if(!button1_busy && !button1_pressed){ + // Toon eindtotaal + pc.printf("Er is zoveel keer geklikt: %d",button_count); + pc.printf("\n"); + + } + } return 0; }