fabianoriccardi / dimmable-light

Arduino library to manage dimmers compatible with AVR, ESP8266, ESP32, SAMD, and RP2040 platforms.
GNU Lesser General Public License v2.1
97 stars 29 forks source link

Added some features #25

Closed SupremeSports closed 1 year ago

SupremeSports commented 3 years ago

Instead of hardcoding values, user can change them in definition/setup

The extra features of this request:

  1. setSyncDir(uint8_t dir) to adjust the interrupt direction FALLING, RISING, CHANGE
  2. setSyncPullup(bool pullup) to activate internal pull-up resistor on zero-crossing detection
  3. setGateTurnOffTime(uint16_t timeOff) to change the value of the gate turn off time
bcelary commented 1 year ago

I am wondering why this couldn't be accepted. Are there any issues with a different edge direction of the interrupt or having an internal pull up resistor enabled? I am using some optocoupler that forces me to either mess with soldering pull down resistor or simply change to FALLING and enable pull up resistor to make it easier. Wondering if I could simply use this patch :thinking:

SupremeSports commented 1 year ago

I am wondering why this couldn't be accepted. Are there any issues with a different edge direction of the interrupt or having an internal pull up resistor enabled? I am using some optocoupler that forces me to either mess with soldering pull down resistor or simply change to FALLING and enable pull up resistor to make it easier. Wondering if I could simply use this patch :thinking:

I had the same optocoupler issue, that's why I did this update and gave it to them but they won't accept it

It works flawlessly on my project; FALLING with internal pullups

bcelary commented 1 year ago

Thanks. I have already forked the repo to change the maximum dimmers, so might as well use this pull request. I am using Arduino Mega. Will see how it goes.

fabianoriccardi commented 1 year ago

Sorry, I missed this update. I gave it a quick glance and it seems fine. I will review it as soon as possible!