May be I wrong but I guess you mixed something in examples/DustSensorDSM/DustSensorDSM.ino
ratio = (lowpulseoccupancy-endtime+starttime)/(sampletime_ms*10.0); // Integer percentage 0=>100
lowpulseoccupancy is counted in microseconds but endtime+starttime are in milliseconds. You cannot just subtract one from the other.
according to datasheet the formula is Low ratio[%] = t (sec) / 30 (sec) 100
so in code (after adjusting units of measure) it must look like this:
ratio = lowpulseoccupancy/((endtime-starttime)10.00);
Hi.
May be I wrong but I guess you mixed something in examples/DustSensorDSM/DustSensorDSM.ino