Andriy Makukha
/
football_project_wo_output
football_project_wo_output
Fork of football_project by
Diff: main.cpp
- Revision:
- 82:1e552cc1a615
- Parent:
- 81:3cd7de5d01ef
- Child:
- 83:79cb2ba44b66
--- a/main.cpp Wed May 25 17:23:00 2016 +0000 +++ b/main.cpp Thu May 26 18:59:19 2016 +0000 @@ -1,6 +1,7 @@ #include <RFM69.h> #include <list> #include "output.h" +#include <DebounceIn.h> using namespace std; @@ -9,10 +10,10 @@ /////////////////////////////////// PINS /////////////////////////////////// -DigitalIn buttonTeam(BUT_TEAM); -DigitalIn buttonSpace(BUT_SPACE); -DigitalIn buttonVolMore(BUT_VOL_MORE); -DigitalIn buttonVolLess(BUT_VOL_LESS); +DebounceIn buttonTeam(BUT_TEAM); +DebounceIn buttonSpace(BUT_SPACE); +DebounceIn buttonVolMore(BUT_VOL_MORE); +DebounceIn buttonVolLess(BUT_VOL_LESS); DigitalOut ledTeamA(LED_TEAM_A); DigitalOut ledTeamB(LED_TEAM_B); @@ -282,8 +283,8 @@ bSpaceOld = bSpaceNew; // Read volume buttons - bVMNew = buttonVolMore; - bVLNew = buttonVolLess; + bVMNew = buttonVolMore.read(); + bVLNew = buttonVolLess.read(); if(bVMNew && !bVMOld) { volume++; if(volume>3) volume=3; @@ -302,7 +303,6 @@ bVMOld = bVMNew; bVLOld = bVLNew; - // Output unsigned long current_time = t.read_ms();