1 /*********************************
 2 代码功能:读取某引脚的模拟量串口返回数据
 3 使用函数:
 4     analogRead(引脚号);     //调用10位AD
 5 创作时间:2016*10*08
 6 作者邮箱:jikexianfeng@outlook.com
 7 ********************************/
 8 int analogTnPin = 2;
 9 void setup()
10 {
11     Serial.begin(9600);
12 }
13 void loop()
14 {
15     int sensorValue = analogRead(analogTnPin);
16     Serial.println(sensorValue);
17     delay(100);
18 }

 

相关文章:

  • 2021-07-27
  • 2022-01-14
  • 2021-12-16
  • 2021-05-19
  • 2021-10-14
  • 2022-12-23
  • 2021-12-19
猜你喜欢
  • 2021-12-03
  • 2021-06-16
  • 2022-12-23
  • 2021-07-25
  • 2021-07-03
  • 2022-12-23
  • 2021-04-05
相关资源
相似解决方案