anklimov / lighthub

Flexible, Arduino Mega/Due/ESP8266/ESP32/STM32 based SmartHome controller with DMX-512 in/out, 1-Wire, Modbus, MQTT interfaces. OpenHab/HomeAssistant/ioBroker compatible.
https://lazyhome.ru
Apache License 2.0
97 stars 23 forks source link

feature request : ads1115, mcp4725, mcp23017 as output .... feature request #65

Open fdepalo opened 2 years ago

fdepalo commented 2 years ago

we can provide testing for these i2c components.

anklimov commented 2 years ago

Looks as reasonable Complete drivers backlog for now:

UART: sc16is750 (primary for air conditioner out) DAC: mcp4725/4728 (for 0-10V outs) ADC: ads1115 GPO: mcp23017 I2C MUX: TCA9548A PWM OUT: PCA9685 BMP180/BME280/BME680

I'm not sure when I will have enough time do develop all items above by myself, so pls consider info below if you have some skills to add every new driver to LightHub :

Note:

Adding new types of items (outputs) - quite easy task. Refer modules/out_relay.cpp (.h) as simplest template for output or modules/out_pid.cpp (.h) as little bit more complicated example for output

after implementing new item type class, inherited from "abstractOut" (most driver functionality lays in virtual methods Setup, Poll, Ctrl), just need to do several simple steps:

=== same for inputs (I will extend tutorial if smbdy will be ready to develop module):

Example: modules/in_ccs811_hdc1080.cpp (.h)