IoAbstraction
Classes | Functions | Variables
DfRobotInputAbstraction.h File Reference

This file contains an implementation of BasicIoAbstraction that works with the DfRobot shield in order to convert the analog keys into regular digital IO. This allows DfRobot to be used with switches for button management. More...

Go to the source code of this file.

Classes

struct  DfRobotAnalogRanges
 
class  DfRobotInputAbstraction
 

Functions

IoAbstractionRef inputFromDfRobotShield (uint8_t pin=A0, AnalogDevice *device=nullptr)
 
IoAbstractionRef inputFromDfRobotShieldV1 (uint8_t pin=A0, AnalogDevice *device=nullptr)
 

Variables

const PROGMEM DfRobotAnalogRanges dfRobotAvrRanges { 0.0488F, 0.2441F, 0.4394F, 0.6347F, 0.8300F}
 
const PROGMEM DfRobotAnalogRanges dfRobotV1AvrRanges { 0.0488F, 0.1904F, 0.3710F, 0.5419F, 0.7714F}
 

Detailed Description

This file contains an implementation of BasicIoAbstraction that works with the DfRobot shield in order to convert the analog keys into regular digital IO. This allows DfRobot to be used with switches for button management.


Class Documentation

◆ DfRobotAnalogRanges

struct DfRobotAnalogRanges
Class Members
float right
float up
float down
float left
float select

Function Documentation

◆ inputFromDfRobotShield()

IoAbstractionRef inputFromDfRobotShield ( uint8_t  pin = A0,
AnalogDevice device = nullptr 
)
inline
Deprecated:
Prefer to use the constructor direct in new code
Parameters
pinthe analog pin
devicethe analog device, defaulted
Returns
the dfRobot device
See also
DfRobotInputAbstraction

◆ inputFromDfRobotShieldV1()

IoAbstractionRef inputFromDfRobotShieldV1 ( uint8_t  pin = A0,
AnalogDevice device = nullptr 
)
inline
Deprecated:
Prefer to use the constructor direct in new code
Parameters
pinthe analog pin
devicethe analog device, defaulted
Returns
the dfRobot device
See also
DfRobotInputAbstraction

Variable Documentation

◆ dfRobotAvrRanges

const PROGMEM DfRobotAnalogRanges dfRobotAvrRanges { 0.0488F, 0.2441F, 0.4394F, 0.6347F, 0.8300F}

Defines the analog ranges to pass to the DfRobotInputAbstraction - default

◆ dfRobotV1AvrRanges

const PROGMEM DfRobotAnalogRanges dfRobotV1AvrRanges { 0.0488F, 0.1904F, 0.3710F, 0.5419F, 0.7714F}

Defines the analog ranges to pass to the DfRobotInputAbstraction - for V1.0 of the board