-20%

攀藤科技 DS-CO2-20 高精度二氧化碳感測器模組

NT$1,381 NT$1,100 未稅

攀藤科技  DS-CO2-20 二氧化碳感測器器 雙通道精準檢測 CO2 二氧化碳

攀藤科技經過長時間研發與測試,全新推出的一款高端二氧化碳傳感器,採用雙通道非分光紅外技術,測量精準,靈敏

尚有庫存

貨號: 52486431(B5-13) 分類: 標籤: , , , ,
  • 商品說明

商品說明

攀藤科技 DS-CO2-20 二氧化碳感測器器 雙通道精準檢測 CO2 二氧化碳

攀藤科技經過長時間研發與測試,全新推出的一款高端二氧化碳傳感器,採用雙通道非分光紅外技術,測量精準,靈敏

 

攀藤科技 DS-CO2-20 高精度二氧化碳感測器模組

範例教學:https://sites.google.com/mail3.hwsh.tc.edu.tw/earth/arduinoadvanced/co2-sensor-ds-co2-20

範例程式CODE:

*/

#include

SoftwareSerial Serial1 = SoftwareSerial(10, 11);

static unsigned int co2 = 0;

static unsigned int ucRxBuffer[10];

void setup() {

Serial.begin(9600);

delay(500);

Serial1.begin(9600);

}

void loop(){

Serial1.listen();

byte request[] = {0x42, 0x4d, 0xe3, 0x00, 0x00, 0x01, 0x72};

Serial1.write(request, 7);

delay(500);

while (Serial1.available()){

for(int i=0; i<12; i=i+1){

ucRxBuffer[i]=Serial1.read();

}

co2 = ucRxBuffer[4]*256+ucRxBuffer[5];

Serial.println(co2);

}

delay(1000);

}