Skip to content

Releases: AJMansfield/TriacDimmer

v1.1.0: Removed Flickering, allow Single-Channel Operation.

07 Jun 16:40
Compare
Choose a tag to compare

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

01 May 14:55
Compare
Choose a tag to compare

Fixes version bump issue.

v1.0.2

01 May 14:52
4b2b052
Compare
Choose a tag to compare

Adds documentation and incorporates syntax fixes from v1.0.1.

v1.0.0

24 Feb 02:17
Compare
Choose a tag to compare
1.0.0 release