Skip to content

Rust example programs for many of my hardware device drivers running on STM32F3 Discovery, STM32F103 "Blue Pill", RaspberryPi and micro:bit boards

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

eldruin/driver-examples

Repository files navigation

Additional example programs for several rust drivers

Build Status

This repository includes examples of using devices through these drivers:

Device driver Description Interface Introductory blog post
Ad983x Waveform generator / direct digital synthesizer (DDS). SPI Intro blog post
Ads1x1x 12/16-bit Analog-to-digital (ADC) converters. I2C Intro blog post
Apds9960 Digital proximity, ambient light, RGB and gesture sensor. I2C
Bmi160 Inertial measurement unit (IMU) (accelerometer + gyro). I2C / SPI
Ds1307 Real-time clock (RTC) / calendar. I2C Intro blog post
Ds323x Extremely accurate real-time clock (RTC) / calendar. I2C / SPI
Eeprom24x 24x series serial EEPROM devices. I2C Intro blog post
Embedded-Ccs811 Digital gas sensor for monitoring indoor air quality. I2C Intro blog post
Hdc20xx Temperature and humidity sensors. I2C
iAQ-Core Indoor air quality sensor. I2C
Isl29125 RGB color light sensor with IR blocking filter. I2C
Kxcj9 Tri-axis MEMS accelerometer. I2C Intro blog post
Lm75 Temperature sensor and thermal watchdog. I2C
Lsm303agr Tri-axis accelerometer and tri-axis magnetometer. I2C / SPI
Max170xx Fuel-gauge for lithium-ion (Li+) batteries. I2C
Max3010x Pulse oximeter and heart-rate sensor. I2C
Max44009 Ambient light sensor. I2C
Mcp4x Digital potentiometers. SPI
Mcp49xx 8/10/12-bit Digital-to-analog (DAC) converters. SPI
Mcp794xx Real-time clock (RTC) / calendar. I2C Intro blog post
Mlx9061x Non-contact infrared (IR) thermometer. I2C
Mma8x5x Tri-axis MEMS accelerometers. I2C
Opt300x Ambient light sensor. I2C Intro blog post
Pcf857x 8/16-pin I/O port expanders. I2C
Pwm-Pca9685 16-pin PWM port expander / LED driver. I2C Intro blog post
Si4703 FM radio turners (receivers). I2C Intro blog post
Tcs3472 RGBW light color sensor with IR filter. I2C
Tmp006 Non-contact infrared (IR) thermopile temperature sensor. I2C Intro blog post
Tmp1x2 Temperature sensors. I2C Intro blog post
Veml6030 Ambient light sensor. I2C Intro blog post
Veml6040 RGBW light color sensor. I2C
Veml6070 Ultraviolet A (UVA) light sensor. I2C
Veml6075 Ultraviolet A (UVA) and B (UVB) light sensor. I2C Intro blog post
W25 Winbond's W25 serial flash memory devices. SPI
Xca9548a TCA9548A/PCA9548A I2C switches/multiplexers. I2C

These examples use several boards: STM32F3-Discovery, STM32F103 "Blue pill", Raspberry Pi and Micro:bit V2. These are classified in different folders.

At the beginning of each example the setup and behavior is described. Many of them also use an SSD1306 OLED display. You can get most of the modules used here on AliExpress generally for a very small price.

These examples are guaranteed to build with the latest Rust stable release. If you get a build error, try updating your Rust installation.

To run the examples, clone this repository, go to the appropriate folder and run either cargo embed or cargo run. Look in the README of each folder for instructions.

git clone https://github.com/eldruin/driver-examples
cd driver-examples/stm32f1-bluepill
# ...

License

Licensed under either of:

at your option.

Contributing

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Rust example programs for many of my hardware device drivers running on STM32F3 Discovery, STM32F103 "Blue Pill", RaspberryPi and micro:bit boards

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Languages