Comments (6)
cool. Thanks :)
from bme280-multibus.
Oh I just noticed that it doesn't support I2C with embedded-hal 1.0.0.x anymore. That's a show stopper for me.
I can look into that, if you want.
Or am I misinterpreting it?
from bme280-multibus.
I just haven't gotten around to it yet, feel free to open a PR with an EH-1 I2C implementation!
from bme280-multibus.
Great. Yes, I will do that. I need support for that.
from bme280-multibus.
No problem, sorry it took a while to review :)
from bme280-multibus.
Could you be so kind an share your code
Try to get ESP32 & BME280 with Rust
but I am lost....
use esp_idf_hal::i2c::*;
use esp_idf_hal::delay::FreeRtos;
use esp_idf_hal::peripherals::Peripherals;
use bme280_multibus::{Address, Bme280, Sample};
const SETTINGS: bme280_multibus::Settings = bme280_multibus::Settings {
config: bme280_multibus::Config::RESET
.set_standby_time(bme280_multibus::Standby::Millis1000)
.set_filter(bme280_multibus::Filter::X16),
ctrl_meas: bme280_multibus::CtrlMeas::RESET
.set_osrs_t(bme280_multibus::Oversampling::X8)
.set_osrs_p(bme280_multibus::Oversampling::X8)
.set_mode(bme280_multibus::Mode::Normal),
ctrl_hum: bme280_multibus::Oversampling::X8,
};
fn main() {
// It is necessary to call this function once. Otherwise some patches to the runtime
// implemented by esp-idf-sys might not link properly. See https://github.com/esp-rs/esp-idf-template/issues/71
esp_idf_svc::sys::link_patches();
// Bind the log crate to the ESP Logging facilities
esp_idf_svc::log::EspLogger::initialize_default();
log::info!("Hello, world!");
use bme280_multibus::{Address, Bme280, Sample};
let peripherals = Peripherals::take().unwrap();
let i2c = peripherals.i2c0;
let sda = peripherals.pins.gpio21;
let scl = peripherals.pins.gpio22;
let mut bme: Bme280<_> = Bme280::from_i2c0(i2c, Address::SdoGnd)?;
bme.settings(&SETTINGS)?;
let sample: Sample = bme.sample().unwrap();
}
from bme280-multibus.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bme280-multibus.