Closed mvrueden closed 6 years ago
Hi, I've checked this problem and it seems that 'continuous mode' and 'wakeup' don't work as expected. Did you encounter similar problem when using query reporting mode? I will investigate it more deeply later.
My findings are related to query reporting mode
, as it is easier to debug. I never tested continous mode
. If you want, I can provide you with my debugging code (for Arduino Nano, though) and how I set up the sensor.
What I did: setup()
query
loop()
Everything is returning a valid message. Only waking up sends 5 random wrong bytes. Sending it twice though, will generate at least 1 valid response message.
Thanks for your response! I've implemented double wakeup (#7) to avoid such issue. It seems that wakeup works ok - sensor fan starts working but sensor sends random bytes or doesn't send anything at all... You can use wakeup when you want to read and check response or wakeupSingle which may result in incorrect response (however seems to awake sensor).
@mvrueden You can now try 1.3.0 release https://github.com/lewapek/sds-dust-sensors-arduino-library/releases/tag/1.3.0
Hello @lewapek, thank you very much for your library.
I tried to use it, but run into a weird issue. If using the continous mode without sleeping everything works fine. But as soon as I put the sensor into sleep mode and wake it up I get weird responses, leading the
sds-dust-sensors-arduino-library
to return anInvalidHead
response.For debugging purposes I implemented my own "library" to investigate further. Putting my sensor to sleep works. Waking it up returns seemingly random 5 bytes, for example, when waking the sensor up after a 30 seconds sleep, this is what the sensor responds:
The
0:
is indicating the index. As theAA
is missing, no new message is identified and thus the index is0
all the time.From this point on all communication works as specified, e.g. sending another
wake up
, returns the following bytesDid you observe a similar behaviour or do you have any idea what might be wrong with my sensor?