Skip to content

Add support for DFRobot DFR0300 EC sensor (using DFRobot DFR0566 Raspberry PI expansion HAT) - #425

Open
linucks wants to merge 9 commits into
flyte:developfrom
linucks:dfr0300
Open

linucks wants to merge 9 commits into
flyte:developfrom
linucks:dfr0300

Conversation

@linucks

@linucks linucks commented Mar 24, 2025

Copy link
Copy Markdown
Contributor

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.

This branch has not been deployed

No deployments
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