MatrixMiniR4 1.1.5
Matrix Mini R4 Arduino Library API Documentation
Loading...
Searching...
No Matches
MiniR4Digital< PIN1, PIN2 > Class Template Reference

Class for handling digital input and output operations. More...

#include <MiniR4Digital.h>

Inheritance diagram for MiniR4Digital< PIN1, PIN2 >:
MiniR4Analog< PIN_A3, PIN_A2 > MiniR4Analog< PIN_A4, PIN_A5 > MiniR4PWM< 3, 2 > MiniR4PWM< 5, 4 > MiniR4PWM< 12, 11 > MiniR4PWM< 13, 10 > MiniR4Analog< PIN1, PIN2 > MiniR4PWM< PIN1, PIN2 >

Public Member Functions

 MiniR4Digital ()
 
bool getL (bool pullup=false)
 Reads the state of the first pin.
 
bool getR (bool pullup=false)
 Reads the state of the second pin.
 
void setL (bool level=HIGH)
 Sets the level of the first pin.
 
void setR (bool level=HIGH)
 Sets the level of the second pin.
 
void toggleL ()
 Toggles the state of the first pin.
 
void toggleR ()
 Toggles the state of the second pin.
 

Public Attributes

MiniR4HC04< PIN1, PIN2 > US
 
MiniR4DHT11< PIN1, PIN2 > DHT11
 
MiniR4DS18B20< PIN1, PIN2 > DS18B20
 
MiniR4_Grove_US< PIN1, PIN2 > GroveUS
 
MiniR4DHT11< PIN2, PIN1 > MXDHT
 
MiniR4DS18B20< PIN2, PIN1 > MXOnewireDT
 

Detailed Description

template<uint8_t PIN1, uint8_t PIN2>
class MiniR4Digital< PIN1, PIN2 >

Class for handling digital input and output operations.

This template class provides methods for reading and writing digital signals to two specified pins, along with instantiating various sensor classes that can be connected to these pins.

Template Parameters
PIN1The first pin number.
PIN2The second pin number.

Definition at line 26 of file MiniR4Digital.h.

Constructor & Destructor Documentation

◆ MiniR4Digital()

template<uint8_t PIN1, uint8_t PIN2>
MiniR4Digital< PIN1, PIN2 >::MiniR4Digital ( )
inline

Definition at line 29 of file MiniR4Digital.h.

Member Function Documentation

◆ getL()

template<uint8_t PIN1, uint8_t PIN2>
bool MiniR4Digital< PIN1, PIN2 >::getL ( bool pullup = false)
inline

Reads the state of the first pin.

Configures the pin as an input and optionally enables the pull-up resistor.

Parameters
pullupTrue to enable the internal pull-up resistor, false otherwise.
Returns
The digital state of the first pin (HIGH or LOW).

Definition at line 43 of file MiniR4Digital.h.

◆ getR()

template<uint8_t PIN1, uint8_t PIN2>
bool MiniR4Digital< PIN1, PIN2 >::getR ( bool pullup = false)
inline

Reads the state of the second pin.

Configures the pin as an input and optionally enables the pull-up resistor.

Parameters
pullupTrue to enable the internal pull-up resistor, false otherwise.
Returns
The digital state of the second pin (HIGH or LOW).

Definition at line 61 of file MiniR4Digital.h.

◆ setL()

template<uint8_t PIN1, uint8_t PIN2>
void MiniR4Digital< PIN1, PIN2 >::setL ( bool level = HIGH)
inline

Sets the level of the first pin.

Configures the pin as an output and writes the specified level to it.

Parameters
levelThe level to write to the pin (HIGH or LOW). Default is HIGH.

Definition at line 78 of file MiniR4Digital.h.

◆ setR()

template<uint8_t PIN1, uint8_t PIN2>
void MiniR4Digital< PIN1, PIN2 >::setR ( bool level = HIGH)
inline

Sets the level of the second pin.

Configures the pin as an output and writes the specified level to it.

Parameters
levelThe level to write to the pin (HIGH or LOW). Default is HIGH.

Definition at line 91 of file MiniR4Digital.h.

◆ toggleL()

template<uint8_t PIN1, uint8_t PIN2>
void MiniR4Digital< PIN1, PIN2 >::toggleL ( )
inline

Toggles the state of the first pin.

Configures the pin as an output and toggles its current state.

Definition at line 102 of file MiniR4Digital.h.

◆ toggleR()

template<uint8_t PIN1, uint8_t PIN2>
void MiniR4Digital< PIN1, PIN2 >::toggleR ( )
inline

Toggles the state of the second pin.

Configures the pin as an output and toggles its current state.

Definition at line 113 of file MiniR4Digital.h.

Member Data Documentation

◆ DHT11

template<uint8_t PIN1, uint8_t PIN2>
MiniR4DHT11<PIN1, PIN2> MiniR4Digital< PIN1, PIN2 >::DHT11

Definition at line 120 of file MiniR4Digital.h.

◆ DS18B20

template<uint8_t PIN1, uint8_t PIN2>
MiniR4DS18B20<PIN1, PIN2> MiniR4Digital< PIN1, PIN2 >::DS18B20

Definition at line 121 of file MiniR4Digital.h.

◆ GroveUS

template<uint8_t PIN1, uint8_t PIN2>
MiniR4_Grove_US<PIN1, PIN2> MiniR4Digital< PIN1, PIN2 >::GroveUS

Definition at line 122 of file MiniR4Digital.h.

◆ MXDHT

template<uint8_t PIN1, uint8_t PIN2>
MiniR4DHT11<PIN2, PIN1> MiniR4Digital< PIN1, PIN2 >::MXDHT

Definition at line 125 of file MiniR4Digital.h.

◆ MXOnewireDT

template<uint8_t PIN1, uint8_t PIN2>
MiniR4DS18B20<PIN2, PIN1> MiniR4Digital< PIN1, PIN2 >::MXOnewireDT

Definition at line 126 of file MiniR4Digital.h.

◆ US

template<uint8_t PIN1, uint8_t PIN2>
MiniR4HC04<PIN1, PIN2> MiniR4Digital< PIN1, PIN2 >::US

Definition at line 119 of file MiniR4Digital.h.


The documentation for this class was generated from the following file: