HomeWaterLeaksDetection
Button.h
Go to the documentation of this file.
1
#ifndef BUTTON_H
2
#define BUTTON_H
3
4
#include "Arduino.h"
5
6
//==================Button class========================
7
13
class
Button
{
14
15
//====================private data======================
16
private
:
17
int
pin
;
18
int
currentInputValue
;
19
int
previousInputValue
;
20
21
//==================public methods======================
22
public
:
25
Button
(
int
pin
);
26
34
int
isPressed
();
35
};
36
37
#endif
Button::isPressed
int isPressed()
Tests if the button is being pressed.
Definition:
Button.cpp:10
Button::Button
Button(int pin)
Constructor of the class.
Definition:
Button.cpp:3
Button::currentInputValue
int currentInputValue
current state of the input pin
Definition:
Button.h:18
Button::pin
int pin
number of the pin the button si connected to
Definition:
Button.h:17
Button
Definition:
Button.h:13
Button::previousInputValue
int previousInputValue
previous state of the input pin
Definition:
Button.h:19
include
Button.h
Generated on Thu May 13 2021 08:42:38 for HomeWaterLeaksDetection by
1.8.18