Proteus Simulation PWM with Arduino and Triac

 


Arduino Sketch for PWM

// Connect the anode of MOC 3021 to Arduino Pin 10.

void setup() 

{

 }


void loop() 

{

  for (int i = 0;i <=255; i++)

{

  analogWrite(10,i);

  delay(100);

}

for (int j = 255; j >=0; j--)

{

  analogWrite(10,j);

  delay(100);

}

}

Comments

Popular posts from this blog

4 Stage Timer With DS3231RTC Module.

Interfacing KY038 sound sensor with Raspberry pi Pico

Digital Clock with Arduino and RTC Module and P10 LEDmatrix