Hello guy's I whant to Programm an SDS011 Air Particle Dust Sensor for a school projekt i seached online but every code i saw got a serial command and i cant figure out what it used for and in my code i got an error everytime.
#include <SDS011.h>
float p10, p25;
int error;
SDS011 my_sds;
void setup() {
my_sds.begin(&Serial1);
Serial.begin(115200);
}
void loop() {
error = my_sds.read(&p25, &p10);
if (!error) {
Serial.println("P2.5: " + String(p25));
Serial.println("P10: " + String(p10));
}
delay(100);
}
This code errors every time