6843浏览
查看: 6843|回复: 4

Bluno M3 ADC

[复制链接]
本帖最后由 dwblinux 于 2015-1-5 09:28 编辑

目录:
    概述
    ADC 参考函数
    参考例程

1.概述
ADC是一个读取端口电压的基础功能,电压区间是0-3.3V,输出数字为0-1023,操作时不需像其他Arduino 输入A0-A5,而是输入Bluno M3上标有AIN的端口号(0、1、2、3、10、11、12、13、15、16、17、18、19、20、27、28)。

2.ADC 参考函数
analogRead()

3.参考例程

  1. int sensorPin = 0;    // select the input pin for the potentiometer        
  2. int sensorValue = 0;  // variable to store the value coming from the sensor        
  3. void setup() {         
  4.         Serial.begin(9600);        
  5. }        
  6. void loop()
  7. {         
  8.         // read the value from the sensor:         
  9.         sensorValue = analogRead(sensorPin);
  10.         
  11.         Serial.println((int)sensorValue);        
  12.         
  13.         delay(1000);               
  14. }
复制代码


hnyzcj  版主

发表于 2015-1-4 15:33:17

顶一个,先
回复

使用道具 举报

hnyzcj  版主

发表于 2015-1-4 15:33:56

楼主能否给我们做点好玩的东西,教教为我们
回复

使用道具 举报

Grey  中级技匠

发表于 2015-1-4 21:11:24

来点图,行不行
回复

使用道具 举报

冰渕  中级技师

发表于 2015-1-6 20:18:15

怎一个好字了得?!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

为本项目制作心愿单
购买心愿单
心愿单 编辑
[[wsData.name]]

硬件清单

  • [[d.name]]
btnicon
我也要做!
点击进入购买页面
上海智位机器人股份有限公司 沪ICP备09038501号-4

© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed

mail