用Proteus仿真Arduino UNO ADC模数转换
- 官方示例代码地址:https://docs.arduino.cc/built-in-examples/basics/AnalogReadSerial
- 仿真效果
实例代码
/**************官方示例:https://docs.arduino.cc/built-in-examples/basics/AnalogReadSerial *****************/
int sensorPin = A0; // select the input pin for the potentiometer
int ledPin = 9;