Hey everyone, I´m new at arduino stuff and I'm trying to control light intensity in a led light bulb using a solid state relay.
In the code shown below, I manage to control light intensity, HOWEVER, as I try to controll it, LED starts to blink and I haven´t managed to make it stop. I already tried changing the delays. I´d really appreciate any help.
const byte pin=3;
int t1,per;
byte i=0;
void setup() {
pinMode(pin,OUTPUT);
}
void loop() {
for (int pw=0; pw<=100; pw=pw+10){
per=5; t1=pw*per/100;
for (int k=0; k<100; k++){
You identified your LED light as a light bulb and are controlling with a SSR, which means you are using an AC powered LED bulb that has electronics in it to convert from AC to the DC required by the LED chip. The LED bulb takes a bit of time to power up the electronics in the bulb. This is what you are fighting.