Sunday, June 13, 2021

Arduino Simulator Example - "Analog Write with 12 LEDs on an Arduino Mega" 🕯

Arduino "Analog Write with 12 LEDs on an Arduino Mega" on Arduino simulator

 Summary

Arduino "Analog Write with 12 LEDs on an Arduino Mega" gently fades 12 LEDs connected to the Arduino Mega board. The LEDs are connected from pin number 2 to pin number 13 (in total, 12 LEDs). This is made possible due to the fact that, we have increased number of PWM pins. Let's get started.

Wokwi Arduino simulator is used here as it is free and easy to use online. 

Tip✅: Always connect a resistor of about 220 ohms in series with the LED. Do not connect them directly to the Arduino Pin.

Wokwi Arduino Simulator - Arduino Mega and 12 LEDs
Wokwi Arduino Simulator - Arduino Mega and 12 LEDs


You can do following things with the Arduino Simulator example

  • Can all the LEDs can be faded ON and OFF at the same time?

Arduino Simulation

In the section below, you can also modify the code and see the results instantly. You can change the code and recompile it by clicking on rerun/Run button. For more help, please visit Discord channel of the Wokwi Arduino Simulator. 

No comments:

Post a Comment

Be Nice Policy :)

Arduino IR simulator projects - "simple receiver"

Arduino "IR simple receiver" on Arduino simulator - IR remote project  Summary Arduino "simple receiver" is an Arduino p...