Mutila: Mouse's Utilities for Arduino
Oft-used utilities: debouncing buttons, averaging samples, and so on.
src
AnalogInputButton.h
1
#pragma once
2
3
#include <stdint.h>
4
#include "AbstractButton.h"
5
19
class
AnalogInputButton
:
public
AbstractButton
{
20
public
:
35
AnalogInputButton
(
const
uint8_t pin,
const
bool
pullup=
true
,
const
uint16_t analogThreshold=512);
36
44
void
begin
();
45
50
bool
on
();
51
52
protected
:
53
const
uint8_t _pin;
54
const
bool
_pullup;
55
const
uint16_t _analogThreshold;
56
57
};
58
AnalogInputButton
Definition:
AnalogInputButton.h:19
AnalogInputButton::begin
void begin()
Definition:
AnalogInputButton.cpp:11
AbstractButton
Definition:
AbstractButton.h:10
AnalogInputButton::on
bool on()
Definition:
AnalogInputButton.cpp:16
AnalogInputButton::AnalogInputButton
AnalogInputButton(const uint8_t pin, const bool pullup=true, const uint16_t analogThreshold=512)
Definition:
AnalogInputButton.cpp:4
Generated by
1.8.15