Skip to content

Conversation

@pleomaxx3002
Copy link
Contributor

Implementation of DHTXX driver based on AdaFruit's driver. #117

Tested with DHT11 and AdaFruit feather-m0

Add dht package that implements driver for dht thermometer
Add high and low frequency definition of counter
Change all code to use counter instead of fixed type uint16
Add device class that performs update of the data if specified
Add additional error outputs
Add UpdatePolicy struct
Add constructor with default and update settings
Add exported error type and error constants for more efficient handling
Make unmanaged device struct to implement Device interface
Make Measurements function for dummy device no longer read measurements
Now the function just returns stored measurements
Add configure function to managed device
Fix initialization flag for ReadMeasurements in dummy device
Add import comment
Exclude DHT from the test package
@deadprogram
Copy link
Member

Hello @pleomaxx3002 thank you for this contribution.

Could you please add an example under the examples directory, and also add it to the "smoketest" make task similar to the other drivers? https://github.com/tinygo-org/drivers/blob/release/Makefile#L158-L159

Thanks!

Add smoke test for dht driver
@deadprogram
Copy link
Member

Thanks for the example @pleomaxx3002 one last change I'd would like to ask can you please eliminate the camel case file names and rename them to all lower case? Thank you very much.

@deadprogram
Copy link
Member

Thank you for making all of the requested updates on this driver @pleomaxx3002 now squash/merging.

Thanks again!

@deadprogram deadprogram merged commit 9a7cb1a into tinygo-org:dev Mar 5, 2021
deadprogram pushed a commit that referenced this pull request Mar 26, 2021
dhtXX: add new driver for dht thermometer
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