Hi @quentin.savean, I don’t see that anyone with a GrovePi responded to your post in a week’s time. Are you still having the problem?
I do not know anything about the GrovePi or the dust sensor, but might be able to suggest some debugging steps.
- Do you have the dust sensor plugged into “D2”?
- Did you try unplug/plug each end of the Grove four wire cable?
- On your GrovePi/Raspbian Desktop, is there a “Test and Troubleshoot” icon?
(If so, run it. Then send the /home/pi/Desktop/log.txt to email@example.com)
- What is the date on your test program?
$ ls -al /home/pi/Dexter/GrovePi/Software/Python/grove_dust_sensor.py
Is this your sensor?
Is it “upright”? Did you wait for the “three minutes preheat time”?
Perhaps try adding a print statement to see what value is returned that is not changing:
[new_val,lowpulseoccupancy] = grovepi.dustSensorRead()
Wishing you luck,