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.参考例程
int sensorPin = 0; // select the input pin for the potentiometer
int sensorValue = 0;// variable to store the value coming from the sensor
void setup() {
Serial.begin(9600);
}
void loop()
{
// read the value from the sensor:
sensorValue = analogRead(sensorPin);
Serial.println((int)sensorValue);
delay(1000);
}
顶一个,先 楼主能否给我们做点好玩的东西,教教为我们 来点图,行不行 怎一个好字了得?!
页:
[1]