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 support for DFRobot DFR0300 EC sensor (using DFRobot DFR0566 Raspberry PI expansion HAT) #425

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

linucks
Copy link
Contributor

@linucks linucks commented Mar 24, 2025

This adds support for the DFR0300 EC sensor

The sensor needs an ADC, so this PR also adds support for the DFRobot DFR0566 Raspberry PI expansion HAT, which is then available to any other sensors that require it, and provides pin sockets for DFRobot Analog, Digital, I2C, PWM preipherals.

As the DFR0566 is effectively a driver, it has been added to a separate drivers directory in the sensors directory so it can be used by other sensors, and other driver code could be added as needed.

For optimal accuracy, the DFR0300 needs to read the current temperature from another sensor, so this PR also adds the event_bus argument to setup_sensor, so that in future, all sensors will be able to query the event bus for any events they may need to subscribe to.

This has required changing the code for all other sensors that call setup_sensor.

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.

1 participant