Roofusჰაი ბრადტ
მართალი ხარ , როგორც ყოველთვის
Button buttonReset(16, 10); // RESET button, pin 16 (A2)
class Button {
public:
Button(byte pin, byte timeButton); // constructor
boolean flagPress; // sign button is pressed (low signal)
boolean flagClick; // sign of a button click (front)
void scanState(); // method waiting for a stable signal state
void filterAvarage(); // method of filtering the signal by the average value
void setPinTime(byte pin, byte timeButton); // set the output number and filter time
if ( buttonReset.flagClick == true ) {
buttonReset.flagClick= false;
msTime=0;
}
This post has been edited by Link on 27 Aug 2020, 12:34