arduino的信号测试环境?

signal test environment for arduino?

我知道这是一个简单的问题,答案也很简单,但我是一个初学者,我认为我什至无法有效地 google。所以请多多包涵。

我只是在寻找某种用于arduino的诊断软件。不是虚拟环境,我想测试控制器本身。具体来说,我正在学习 I/O 和模拟信号,并想测试我连接的旋转电位器在我转动时是否向控制器发送 0-255 值(按编程)。

有没有人知道这种类型的软件的名称,我可以在其中从我的模拟输入中获取实时值?

提前致谢!

我认为从模拟引脚读取输入并在 Serial monitor 上打印就可以了。

这是我从 arduino 文档中提取的一个简单代码,您可能想使用它:

/*
  AnalogReadSerial
  Reads an analog input on pin 0, prints the result to the serial monitor.
  Graphical representation is available using serial plotter (Tools > Serial Plotter menu)
  Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.

  This example code is in the public domain.
*/

// the setup routine runs once when you press reset:
void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
}

// the loop routine runs over and over again forever:
void loop() {
  // read the input on analog pin 0:
  int sensorValue = analogRead(A0);
  // print out the value you read:
  Serial.println(sensorValue);
  delay(1);        // delay in between reads for stability
}

请在此 link 上查找代码的完整详细信息。