Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Reading from Sensor #2

Open
fabianbaier opened this issue Dec 7, 2018 · 3 comments
Open

Error Reading from Sensor #2

fabianbaier opened this issue Dec 7, 2018 · 3 comments

Comments

@fabianbaier
Copy link

Hi,

First thanks for putting this together!

When plugging my SDS011 I found the device is mounted under /dev/tty.usbserial-1410

I get

2018/12/07 15:39:47 ERROR: sensor.Get: bad checksum: &sds011.response{Header:0x98, Command:0xe6, Data:[6]uint8{0x0, 0x98, 0x80, 0x0, 0x9e, 0x80}, CheckSum:0x0, Tail:0x80}

Do you know how to quickly fix this?

@maurorappa
Copy link

Hi,
I have exactly the same issue:
2019/05/08 22:53:16 ERROR: sensor.Get: bad checksum: &sds011.response{Header:0x98, Command:0xe6, Data:[6]uint8{0x0, 0x7e, 0x60, 0x86, 0x18, 0x9e}, CheckSum:0x86, Tail:0xf8}

my serial number is 5002-7B72, it must be a newer version...

@matitalatina
Copy link

Same issue

2020/11/13 07:23:16 ERROR: sensor.Get: bad checksum: &sds011.response{Header:0x0, Command:0x3f, Data:[6]uint8{0x1, 0xe9, 0x94, 0xa1, 0xab, 0xaa}, CheckSum:0xc0, Tail:0xe2}
2020/11/13 07:23:17 ERROR: sensor.Get: bad checksum: &sds011.response{Header:0x0, Command:0x40, Data:[6]uint8{0x1, 0xe9, 0x94, 0xa0, 0xab, 0xaa}, CheckSum:0xc0, Tail:0xe3}

My serial number is 5003-XXXX

@matitalatina
Copy link

I just fixed using, I don't put error handling for clarity.

sensor.Awake()
sensor.SetCycle(1)
sensor.MakeActive()
sensor.Get()

In other words, make everything explicit about what you want to do.
Maybe the sensor is in a different state, so it fails checksum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants