Mutila: Mouse's Utilities for Arduino
Oft-used utilities: debouncing buttons, averaging samples, and so on.
src
DebouncedAnalogButton.h
1
#pragma once
2
3
#include <stdint.h>
4
#include "AbstractDebouncedButton.h"
5
#include "AnalogInputButton.h"
6
16
class
DebouncedAnalogButton
:
public
AbstractDebouncedButton
,
public
AnalogInputButton
{
17
public
:
24
DebouncedAnalogButton
(
const
uint8_t pin,
const
bool
pullup=
true
,
const
uint16_t analogThreshold=512);
25
36
void
begin
(uint8_t threshold=AbstractDebouncedButton::DefaultThreshold, uint8_t delay=AbstractDebouncedButton::DefaultButtonDelay);
37
42
void
update
();
43
49
bool
on
();
50
51
};
52
53
AnalogInputButton
Definition:
AnalogInputButton.h:19
AbstractDebouncedButton
Definition:
AbstractDebouncedButton.h:11
AnalogInputButton::begin
void begin()
Definition:
AnalogInputButton.cpp:11
DebouncedAnalogButton::on
bool on()
Definition:
DebouncedAnalogButton.cpp:31
DebouncedAnalogButton::DebouncedAnalogButton
DebouncedAnalogButton(const uint8_t pin, const bool pullup=true, const uint16_t analogThreshold=512)
Definition:
DebouncedAnalogButton.cpp:5
DebouncedAnalogButton::update
void update()
Definition:
DebouncedAnalogButton.cpp:16
DebouncedAnalogButton
Timeslice-based button with debouncing using analogRead.
Definition:
DebouncedAnalogButton.h:16
Generated by
1.8.15