Skip to content

Example of home sensor using STM32F103C8 (blue pill) written in Rust

Notifications You must be signed in to change notification settings

etiennetremel/stm32-home-sensor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

STM32 home sensor STM32F103C8 (blue pill)

Example of home sensor using STM32F103C8 (blue pill) written in Rust. It displays temperature, humidity and co2 on a LCD1602 display. Data is pulled every 2 seconds from a SCD30 sensor which share the same i2c bus as the display.

Connectivity

graph TB
    subgraph lcd1602[lcd1602 display - <i>i2c addr 0x27</i>]
        lcd1602_scl(SCL)
        lcd1602_sda(SDA)
        lcd1602_grd(GRD)
        lcd1602_vcc(VCC)
    end
    subgraph stm32f103c8
        stm32_b6(B6)
        stm32_b7(B7)
        stm32_grd(GRD)
        stm32_vcc(VCC 3.3v)
    end
    subgraph scd30[scd30 sensor - <i>i2c addr 0x61</i>]
        scd30_scl(SCL)
        scd30_sda(SDA)
        scd30_grd(GRD)
        scd30_vcc(VCC)
    end
    
    stm32_b6-->lcd1602_scl-->scd30_scl
    stm32_b7-->lcd1602_sda-->scd30_sda
    stm32_grd-->lcd1602_grd-->scd30_grd
    stm32_vcc-->lcd1602_vcc-->scd30_vcc
Loading

Getting started

cargo make flash

Debugging

Uncomment hprintln lines in the main.rs, then:

# build and listen
cargo make openocd

# then debug in another terminal
cargo make debug
(gdb) continue

Datasheet

About

Example of home sensor using STM32F103C8 (blue pill) written in Rust

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published