(SKU:SEN0177)PM2.5激光粉尘传感器的Demo代码注释错误
2015-11-031.4万
AI 快速预览详细
本文讨论了SKU:SEN0177的PM2.5激光粉尘传感器演示代码中的注释错误。通过具体指出错误并提供修正建议,帮助开发者快速解决问题,提高代码质量和项目可靠性。
| 产品资料库内的(SKU:SEN0177)PM2.5激光粉尘传感器的演示代码的注释不对,望尽快修改。谢谢。 |
| 产品资料库内的(SKU:SEN0177)PM2.5激光粉尘传感器的演示代码的注释不对,望尽快修改。谢谢。 |
创作许可协议
本项目采用 None(不开放任何权利,保留所有权利) 进行许可。
创作许可协议
本项目采用 None(不开放任何权利,保留所有权利) 进行许可。
上面这句,最后那个",5"是什么意思?
#include "serialReadPMValue.h"
uint16_t PM2_5Value=0; //define PM2.5 value of the air detector module
#define receiveDatIndex 32
uint8_t receiveDat[receiveDatIndex]; //receive data from the air detector module
#include
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
void setup() {
Serial.begin(9600); //set the serial's Baudrate of the air detector module
lcd.begin(16, 2);
}
void loop(){
lcd.setCursor(0, 0); // set the LCD cursor position
int length = serialRead(Serial,receiveDat,receiveDatIndex,5); //change the serial port:Serial1,Serial2..
int checkSum=checkValue(receiveDat,receiveDatIndex);
if(length&&checkSum) {
PM2_5Value=transmitPM2_5(receiveDat);//count PM2.5 value of the air detector module
}
static unsigned long OledTimer=millis(); //every 0.5s update the temperature and humidity from DHT11 sensor
if (millis() - OledTimer >=1000)
{
OledTimer=millis();
lcd.print("pm2.5: ");
lcd.print(PM2_5Value);
lcd.print(" ug/m3");
Serial.print("PM2.5: "); //send PM1.0 data to bluetooth
Serial.print(PM2_5Value);
Serial.println(" ug/m3");
}
}
哪里有蓝牙?