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

PMSA0031 sensors require ~3secs before coming up on I2C #4743

Merged
merged 4 commits into from
Sep 18, 2024

Conversation

fifieldt
Copy link
Contributor

As reported by @MALAONE1 and debugged by @shodan8192 , PMSA0031s on a RAK4631 take 3 seconds before they can become detectable on I2c.

Add a delay(4000) before I2C scan if the air quality sensor pin is defined.

Fixes #3690

@caveman99
Copy link
Member

This can be solved more elegantly by doing a rescan when the actual module initializes. We do the same with cardkb for the same reason. Gonna have a look at it later on.

@fifieldt
Copy link
Contributor Author

Elegant sounds better!

Copy link
Contributor Author

@fifieldt fifieldt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elegant :)

fifieldt and others added 3 commits September 18, 2024 21:37
As reported by @MALAONE1 and debugged by @shodan8192 , PMSA0031s
on a RAK4631 take 3 seconds before they can become detectable on I2c.

Add a delay(4000) before I2C scan if the air quality sensor pin
is defined.

Fixes meshtastic#3690
@thebentern thebentern merged commit 35e1c40 into meshtastic:master Sep 18, 2024
105 checks passed
@fifieldt fifieldt deleted the PMSA003I branch September 19, 2024 10:54
panaceya pushed a commit to mesh-mk-ua/meshtastic-firmware that referenced this pull request Sep 20, 2024
)

* PMSA0031 sensors require ~3secs before coming up on I2C

As reported by @MALAONE1 and debugged by @shodan8192 , PMSA0031s
on a RAK4631 take 3 seconds before they can become detectable on I2c.

Add a delay(4000) before I2C scan if the air quality sensor pin
is defined.

Fixes meshtastic#3690

* Remove 4 second wait and rescan during air quality init for the sensor

* works without but this triggers my OCD

---------

Co-authored-by: Thomas Göttgens <[email protected]>
Co-authored-by: Ben Meadors <[email protected]>
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.

PMSA Sensor no detected[Bug]:
3 participants