Example of reading the BME280 sensor on an ESP32-C3 using Rust

Overview

Rust ESP32-C3 BME280

Example of reading the BME280 sensor on an ESP32-C3 using Rust

Hardware:

  • ESP32-C3 microcontroller
  • BME280 sensor
  • Breadboard
  • Jump wires
  • USB-A to Micro-B cable

Step 1: attach the ESP32-C3 to the breadboard (with its headers).

Step 2: attach the BME280 to the breadboard (with its headers).

Step 3: using the jump wires, connect the ESP32-C3 to the BME280:

  • 3V3 to VIN
  • GND to GND
  • GPIO 2 to SDA
  • GPIO 3 to SCL

Note: you can use any available GPIO pins for SDL and SCL, but remember to change the code accordingly.

Step 4: connect the USB cable to your computer or laptop.

Software:

Step 1: follow these instructions to setup the development environment.

Step 2: Execute cargo run on the command line (to build, flash, and monitor). Note: on Linux, you may have to fix a permission issue.

If the universe conspires in your favor, you should see an output like this:

I (409) rust_esp32_bme280: Successfully initialized BME280 device
I (2529) rust_esp32_bme280: Relative Humidity = 69%
I (2529) rust_esp32_bme280: Temperature = 25°C
I (2529) rust_esp32_bme280: Pressure = 101698 Pa

Let me know if I skipped any steps.

You might also like...
Rust / C / Cgo example

whatever How to build (This has been tested on Linux & macOS) Build the Rust code: $ cargo build The library is in ./target/debug/libwhatever.a Build

A variation of the solana helloworld program example with a client written in Rust instead of Typescript

Simple Solana Smart Contract Example This repository demonstrates how to create and invoke a program on the Solana blockchain. In Solana the word prog

An example Kibana plugin written in Rust and Typescript

An example Kibana plugin written in Rust and Typescript

An example of Brainf*** JIT-compiler with only the standard library.

jit-compiler An example of Brainf*** JIT-compiler with only the standard library. Prerequisite Rust(1.56.0-nightly or later, but it must work kind of

The Voting example based on MoonZoon and Solana.
The Voting example based on MoonZoon and Solana.

Voting example The Rust-only Voting example based on MoonZoon and Solana. MoonZoon is a Rust Fullstack Framework. Solana is a decentralized blockchain

A basic rp2040-hal project with blinky and rtt logging example code.

A basic rp2040-hal project with blinky and rtt logging example code. With this you can quickly get started on a new rp2040 project

Example of structuring a proc macro crate for testability

testing-proc-macros Example of structuring a proc macro crate for testability. See accompanying blog post for details. License Licensed under either o

`Debug` in rust, but only supports valid rust syntax and outputs nicely formatted using pretty-please
`Debug` in rust, but only supports valid rust syntax and outputs nicely formatted using pretty-please

dbg-pls A Debug-like trait for rust that outputs properly formatted code Showcase Take the following code: let code = r#" [ "Hello, World!

dm-jitaux is a Rust-based JIT compiler using modified auxtools, dmasm and Inkwell LLVM wrapper for boosting Byond DM performance without any hassle!

dm-jitaux is a Rust-based JIT compiler using modified auxtools, dmasm and Inkwell LLVM wrapper for boosting Byond DM performance without any hassle (such as rewriting/refactroing your DM code).

Owner
Wei-ying Chen
Wei-ying Chen
Rust embedded-HAL driver for the AHT20 temperature and humidity sensor.

AHT20-driver Rust embedded-HAL driver for the AHT20 temperature and humidity sensor. You can read my blog post AHT20 thermometer driver which details

Rikard Anglerud 3 Nov 15, 2022
I2C driver for the AHT21B temperature and humidity sensor.

I2C driver for the AHT21B temperature and humidity sensor.

Rushen Wang 2 Mar 7, 2022
Demo of tokio running on esp32 using esp-idf

Tokio running on esp32! This repo demonstrates a working hello world utilizing upstreamed tokio support for esp32. The tokio executor and I/O reactor

Josh Guilfoyle 9 Aug 7, 2023
ESP32-C3 interfacing to a PS/2 Keyboard (bare-metal Rust)

ESP32-C3 interfacing to a PS/2 Keyboard (bare-metal Rust) Very simplified example of connecting a PS/2 keyboard to ESP32-C3 You need to build it with

Björn Quentin 3 Dec 5, 2022
Rust implementation of ESP32 NVS partition generator.

Simple ESP32 NVS writer library for Rust Overview A library for Rust to generate NVS partitions for ESP32. How to use See examples/write_simple.rs. Ma

Kenta IDA 4 Dec 29, 2022
Esp-backtrace - backtrace for ESP32 bare-metal

esp-backtrace - backtrace for ESP32 bare-metal supports ESP32, ESP32C3, ESP32S2, ESP32S3 optional features: panic-handler, exception-handler (will ena

Björn Quentin 10 Dec 14, 2022
Backtrace for ESP32 bare-metal

esp-backtrace - backtrace for ESP32 bare-metal supports ESP32, ESP32C3, ESP32S2, ESP32S3 optional features: panic-handler, exception-handler (will ena

esp-rs 10 Dec 14, 2022
Embedded demo based on esp32-c3

wot-esp-demo Demo Hygro-Thermometer based on the esp-rust-board. http version based on std-training Deploy Rust prerequisites Install espflash, ldprox

null 3 Dec 1, 2023
An application for reading comics together.

Shared comic reader Creates a web server that serves image sets to one or more clients. When one of those clients turns a page, all other clients who

null 0 Dec 17, 2021
A example bevy application using bevy-kajiya for its renderer

☀️ bevy-kajiya playground A example bevy application using bevy-kajiya for its renderer NOTE: only tested on Windows. For more context, check out the

Sebastian Hamel 20 Dec 5, 2022