Arduino-GPIO
General Purpose Input/Output (GPIO) library for Arduino
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
Button.ino
Go to the documentation of this file.
1
#include "GPIO.h"
2
#include "
Button.h
"
3
4
Button<BOARD::D7>
button
;
5
6
void
setup
()
7
{
8
Serial
.begin(57600);
9
while
(!
Serial
);
10
}
11
12
void
loop
()
13
{
14
if
(button.
ischanged
()) {
15
Serial
.print(button.
timestamp
());
16
Serial
.print(
':'
);
17
Serial
.println(button ? F(
"released"
) : F(
"pushed"
));
18
}
19
}
Button.h
Button
Definition:
Button.h:31
setup
void setup()
Definition:
Button.ino:8
Button::ischanged
bool ischanged()
Definition:
Button.h:50
button
Button< BOARD::D1 > button
Definition:
Button.ino:6
Serial
Software::Serial< BOARD::D0 > Serial
Definition:
Button.ino:5
loop
void loop()
Definition:
Button.ino:14
Button::timestamp
uint16_t timestamp()
Definition:
Button.h:86
examples
Button
Button.ino
Generated on Sat Oct 14 2017 16:03:22 for Arduino-GPIO by
1.8.11