I use EasyESP in my office for quite some time now, I think it's been 2 years already, I was switching ON and OFF 2 x 5m led strips and now it's time for an upgrade
First I want to have a soft-start (dim leds from OFF to FULLY ON) and also soft-stop (dim leds from ON to OFF). I have my hardware ready on an breadboard, will make an small PCB but I'm curios regarding the software side, for no I just made a simple code to DIM leds ON and OFF in a loop but I'm curious if I can still use EasyESP, wondering if using rules I can make something like this :
Code: Select all
if pin changed state
{
if pin == 1
{
// DIM LEDS ON
for x = 0; x < 255; x++
analogWrite(pwm pin, x )
}
if pin == 0
{
// DIM LEDS OFF
for x = 255; x > -1; x--
analogWrite(pwm pin, x )
}
}
After I will make the dim function, I want to mount a few PIR sensors to automate the ON and OFF proccess.
Thank you.