I want to adapt LUT for 50Hz mains, but can't figure out exactly what equation you were using for it:
|
static const uint8_t powerToTicks[] PROGMEM = { |
The one I have gives similar results but not quiet the same. I am using
acos(1-(2*(level/100))) to calculate angle and then convert it to delay in microseconds, but it seems to ramp up more gradually, though the overall shape of the curve is the same.
I want to adapt LUT for 50Hz mains, but can't figure out exactly what equation you were using for it:
Dimmer/src/Dimmer.cpp
Line 48 in da15bc7
The one I have gives similar results but not quiet the same. I am using
acos(1-(2*(level/100)))to calculate angle and then convert it to delay in microseconds, but it seems to ramp up more gradually, though the overall shape of the curve is the same.