Saturday, June 12, 2021

Arduino Simulator Examples - "Read Analog Voltage" 📈

Arduino "Read analog voltage" on Arduino simulator

 Summary

Arduino "Read analog voltage" Program reads the value of the ADC for the selected channel. The Potentiometer is an easy to use device to generate analog voltages from 0 V up to 5V. The Analog input A0 is used on the UNO for this specific example.

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 - Read Analog voltage
Wokwi Arduino Simulator - Analog read voltage

 

Tip✅: The ADC resolution is set to 10 bit by default to match UNO. Other Arduino boards have different (higher) resolution. You have dedicated functions to set the desired ADC resolution.

You can do following things with the Arduino Simulator example

  • Blink the LED (on board LED, pin 13) whenver the ADC value is higher than 2.5 V

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