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

Add SHT20 using si7021 driver #409

Merged
merged 1 commit into from
Feb 13, 2023
Merged

Conversation

tyeth
Copy link
Contributor

@tyeth tyeth commented Feb 13, 2023

Adds SHT20

@tyeth tyeth mentioned this pull request Feb 13, 2023
@brentru brentru self-requested a review February 13, 2023 16:56
@brentru
Copy link
Member

brentru commented Feb 13, 2023

@tyeth This should be fine. Have you tested it on hardware yet?

@tyeth
Copy link
Contributor Author

tyeth commented Feb 13, 2023

Yes just this second seen another bug though, #410, it seems to not send a Device Init message when you add a Dev component, but it works with a reboot (the component is added to the list but the device gets no component Init message).
This can now be nicely tested with the Si7021 and the SHT20 (both use same driver but one is Dev state). I believe the HU21D is also driver compatible if you have one of those and no Si7021/SHT20.

An example of the console output for deleting the Si7021 and adding it as the SHT20 instead. It de-inits the si7021, does a scan when adding the SHT20 to verify address, then never does an Init. The same is not the case with non-dev components.

17:45:19.343 -> PING!
17:45:24.084 -> PING!
17:45:28.767 -> PING!
17:45:30.201 -> * NEW MESSAGE [Topic: Signal-I2C]: 
17:45:30.201 -> 4 bytes.
17:45:30.201 -> cbDecodeSignalRequestI2C
17:45:30.201 -> NEW COMMAND: I2C Device Deinit
17:45:30.201 -> Publishing Message: I2CResponse...Published!
17:45:33.492 -> PING!
17:45:38.205 -> PING!
17:45:42.908 -> PING!
17:45:45.788 -> * NEW MESSAGE [Topic: Signal-I2C]: 
17:45:45.788 -> 12 bytes.
17:45:45.788 -> cbDecodeSignalRequestI2C
17:45:45.788 -> I2C Scan Request
17:45:45.788 -> EXEC: I2C Scan
17:45:45.788 -> Found I2C Device at 0x11
17:45:45.788 -> Found I2C Device at 0x64
17:45:45.788 -> I2C Devices Found: 2
17:45:45.788 -> Publishing Message: I2CResponse...Published!
17:45:47.626 -> PING!
17:45:52.319 -> PING!
17:45:57.020 -> PING!
17:46:01.762 -> PING!
17:46:06.488 -> PING!
17:46:11.169 -> PING!
17:46:15.884 -> PING!
17:46:20.610 -> PING!
17:46:25.041 -> STATUS LED BLINK KAT
17:46:25.312 -> PING!
17:46:30.019 -> PING!

@brentru
Copy link
Member

brentru commented Feb 13, 2023

@tyeth Thank you for finding the bug. I assigned @lorennorman to take a look at it.

In the meantime, I am going to review this PR and merge it in. I'll also set the component to published. Likely a new WS release today, too, as I'm adding #411

@brentru brentru merged commit 9b70ddd into adafruit:main Feb 13, 2023
@tyeth
Copy link
Contributor Author

tyeth commented Feb 13, 2023

@brentru Thanks for the rapid work. Did you spot the packet size decode error returned? #408

@brentru
Copy link
Member

brentru commented Feb 13, 2023

I didn't, added to my assignments.

@tyeth tyeth deleted the add-sht20-as-si7021 branch February 14, 2023 00:23
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

Successfully merging this pull request may close these issues.

2 participants