-
Notifications
You must be signed in to change notification settings - Fork 181
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
Example of using i2c with the bme280 air sensor #313
Conversation
11e228b
to
1cde2af
Compare
Rebase, please. |
I don't think we should add deps for examples, but I would also like to have a way to have example code like this, perhaps in a separate repo? |
If you are interested, I have a lot of examples using this HAL here |
Oh nice, that's a great resource. Would you mind if we make that more official by linking to it in the readme and directing examples like this one there? @eldruin |
Sure, I would be happy if it gets more visibility. I have tried to write many self-contained examples for different devices. |
Sorry, I didn't notice the conversation on this. The dep is only acitve if requested as a feature, other repos like Druid support examples that need extras like that. If this example is useful i can look up adding the dep as part of the example, i think that's possible. i didn't want to put too much effort in to meta stuff like that until I knew if it would be helpful. Might this be merged if i can sort out the deps? |
1cde2af
to
1d97304
Compare
1d97304
to
36a1e2d
Compare
@burrbull this is re-based now, if you are interested. |
LGTM |
Oh cool, in the current state, I think this is a great change, thanks! |
I created this example for my self as a reference for a more complex use of the bme280 sensor. And thought it might be nice to share.
I noted the comments in #24 that it seems like you don't want examples of real hardware, but I don think this is explicitly stated. Would you like a example like this? I might offer it to the bme280 crate but there example is i2c master agnostic, ill just put it on my blog as reference if this is not the place for it, but i think it will be much more easily discoverable here.
You can get bme280 breakout boards for less than £20 in the uk, eg https://thepihut.com/products/adafruit-bme280-i2c-or-spi-temperature-humidity-pressure-sensor so there pretty cheap and cheerful so it seems like a nice thing to use as a example as its cheap and you can see the values change quite quickly if you put your finger on it or blow on it.
If you would like it how would you like the dep added? the way i have added it, it is only ever built if some one asks for it but it might be nicer as a dev dep, but i don't think they can be optional.