Releases: AJMansfield/TriacDimmer
Releases · AJMansfield/TriacDimmer
v1.1.0: Removed Flickering, allow Single-Channel Operation.
This update resolves a number of issues with flickering, and adds the ability to use only one of the two output pins if desired so the other can be used for other things.
Code Changes:
- Fixed output compare match behavior to use correct mode. #12, #14
- Extend pulses near the beginning of the phase to a minimum time to ensure the triac latches on. #15, #16
- Allow detaching the library from a pin so it can be used for other code. (By default both pins are now detached until you call
setBrightness
.) #13 - Turn pulse off completely for brightness values < 0.01 to ensure the pulse doesn't overrun into the next phase. (This threshold is configurable.) Note that also there's a similar option for turning the pin on completely above a certain threshold, but it's normally not needed and is disabled by default.
- Buffer pulse parameters to prevent flickering when increasing brightness. Previously the falling edge time was updated immediately but this could result in a pulse with an inconsistent length.
- Access control variables atomically. The odds of the previous non-atomic accesses causing issues were slim, but now they're zero.
The documentation and example code has also been updated to reflect the changes. Note that there's now a section in the README describing how to tune the library's parameters if you're still getting flickering with the new code.
Note that the API hasn't changed; this should just be a drop-in replacement for any previous code that used this library.
Special thanks to @JAndrassy for help with diagnosing and fixing these issues.
v1.0.3
Fixes version bump issue.
v1.0.2
Adds documentation and incorporates syntax fixes from v1.0.1.
v1.0.0
1.0.0 release