I2Cwrapper v0.5.0
Generic framework for Arduino I2C target devices
PinI2C Class Reference

An I2C wrapper class for remote analog and digital pin control. More...

Detailed Description

An I2C wrapper class for remote analog and digital pin control.

This class mimicks the original pin read and write commands. It replicates all of the methods and transmits each method call via I2C to a target running the firmware.ino firmware, given that the pin control module is enabled at compile time. Functions and parameters without documentation will work just as their original, but you need to take the general restrictions into account (e.g. don't take a return value for valid without error handling).

Note
ESP32 needs ESP32 Arduino 2.0.1 (see board manager) or higher for native analogWrite() support.
analogReference() is only implemented for AVRs, ESPs don't have it.
Todo:
Only tested on AVRs.

Public Member Functions

 PinI2C (I2Cwrapper *w)
 Constructor. More...
 
void pinMode (uint8_t, uint8_t)
 
void digitalWrite (uint8_t, uint8_t)
 
int digitalRead (uint8_t)
 
int analogRead (uint8_t)
 
void analogReference (uint8_t mode)
 
void analogWrite (uint8_t, int)
 

Constructor & Destructor Documentation

◆ PinI2C()

PinI2C::PinI2C ( I2Cwrapper w)

Constructor.

Parameters
wWrapper object representing the target the pins are connected to.

Member Function Documentation

◆ analogRead()

int PinI2C::analogRead ( uint8_t  pin)

◆ analogReference()

void PinI2C::analogReference ( uint8_t  mode)

◆ analogWrite()

void PinI2C::analogWrite ( uint8_t  pin,
int  value 
)

◆ digitalRead()

int PinI2C::digitalRead ( uint8_t  pin)

◆ digitalWrite()

void PinI2C::digitalWrite ( uint8_t  pin,
uint8_t  value 
)

◆ pinMode()

void PinI2C::pinMode ( uint8_t  pin,
uint8_t  mode 
)

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