Expand description
§Modulino
A hardware-agnostic, no_std Rust driver for Arduino Modulino breakout boards.
This crate provides drivers for the following Modulino devices:
Buttons- Three-button module with LEDsBuzzer- Piezo speaker modulePixels- 8 RGB LED module (APA102-compatible)Distance- Time-of-Flight distance sensor (VL53L4CD)Movement- IMU module (LSM6DSOX accelerometer/gyroscope)Knob- Rotary encoder with buttonThermo- Temperature and humidity sensor (wrapshs3003crate)Joystick- Analog joystick with buttonLatchRelay- Latching relay moduleVibro- Vibration motor module
§Example
ⓘ
use modulino::{Pixels, Color};
// Create a Pixels instance with your I2C bus
let mut pixels = Pixels::new(i2c)?;
// Set the first LED to red
pixels.set_color(0, Color::RED, 50)?;
// Apply the changes
pixels.show()?;§Features
defmt: Enabledefmtdebug formatting for error types
§Hardware Requirements
All Modulino devices communicate over I2C at 100kHz. They use the Qwiic/STEMMA QT connector standard for easy daisy-chaining.
Modules§
- addresses
- Default I2C addresses for Modulino devices.
- pinstrap
- Pinstrap address map for device type detection.
Structs§
- Button
Led - LED state for a single button LED.
- Button
State - Button state representation.
- Buttons
- Driver for the Modulino Buttons module.
- Buzzer
- Driver for the Modulino Buzzer module.
- Color
- Represents an RGB color.
- Distance
- Driver for the Modulino Distance module.
- I2cDevice
- Helper struct for I2C operations.
- Joystick
- Driver for the Modulino Joystick module.
- Knob
- Driver for the Modulino Knob module (rotary encoder).
- Latch
Relay - Driver for the Modulino Latch Relay module.
- Movement
- Driver for the Modulino Movement module (LSM6DSOX IMU).
- Movement
Values - 3-axis measurement values.
- Pixels
- Driver for the Modulino Pixels module.
- Thermo
- Driver for the Modulino Thermo module (HS3003 sensor).
- Thermo
Measurement - Temperature and humidity measurement.
- Vibro
- Driver for the Modulino Vibro module.
Enums§
- Error
- Error type for Modulino operations.
- Hs3003
Error - Errors that can occur when interacting with the sensor
- Note
- Musical note frequencies in Hz.
- Power
Level - Predefined power levels for the vibration motor.
Type Aliases§
- Result
- Result type alias for Modulino operations.