Saturday, June 12, 2021

Arduino simulator examples - "Blink an LED" 💡

Arduino "Blink an LED" on Arduino simulator

 Summary

Arduino "Blink an LED" Program blinks an LED. The LED in this example is connected to pin 13 of the Arduino UNO. There is also an onboard LED. You, to try this example on real board/simulator you don't have to really connect an LED externally. You can click on Run button in the simulator below to see the Arduino simulator in action. Wokwi Arduino simulator is used here as it is free and easy to use online. 

Wokwi Arduino Simulator - Blink an LED
Wokwi Arduino Simulator - Blink an LED

 

Warning🚨: Make sure you connect a resistor in series when you connect an LED to a real board. If not, you may damage the LED or the Board or worse, both!  

Tip✅: Red LEDs will have lower forward voltage compared to blue or white LEDs. Hence, Red LEDs need a higher value of resistor in series compared to a white LED for the same brightness.

You can do following things with the Arduino Simulator example

  • Change the LED blinking frequency to 10 Hz
  • Change the color of the LED
  • Add one more LED on pin 12 and make both LEDs blink together
  • Change one of the LED to a different color and blink the two LEDs alternatively. 

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...