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

Proteus simulation 4x4 Matrix Keypad with Arduino and LCD screen

Digital Clock with Arduino and RTC Module and P10 LEDmatrix

Interfacing KY038 sound sensor with Raspberry pi Pico