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 moduleLedMatrix- 12x8 LED matrix displayPressure- Barometric pressure and temperature sensorLight- RGB and ambient light sensor
§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.
- Hub
- Driver for the Modulino Hub (TCA9548A I2C multiplexer).
- HubPort
- A helper representing a specific port of the Hub.
- 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.
- LedMatrix
- Driver for the Modulino LED Matrix module.
- Light
- Driver for the Modulino Light module (LTR-381RGB sensor).
- Light
Measurement - Measurement result from the Light sensor.
- Motors
- Driver for the Modulino Motors module.
- Movement
- Driver for the Modulino Movement module (LSM6DSOX IMU).
- Movement
Values - 3-axis measurement values.
- Opto
Relay - Driver for the Modulino Opto Relay module.
- Pixels
- Driver for the Modulino Pixels module.
- Pressure
- Driver for the Modulino Pressure module (LPS22HB sensor).
- Thermo
- Driver for the Modulino Thermo module (HS3003 sensor).
- Thermo
Measurement - Temperature and humidity measurement.
- Vibro
- Driver for the Modulino Vibro module.
Enums§
- Decay
Mode - Supported motor current decay modes.
- Display
Mode - Display mode for the LED Matrix.
- Error
- Error type for Modulino operations.
- Gain
- Available gain settings for the LTR-381RGB sensor.
- Hs3003
Error - Errors that can occur when interacting with the sensor
- Measurement
Rate - Available measurement rates for the LTR-381RGB sensor.
- Note
- Musical note frequencies in Hz.
- Power
Level - Predefined power levels for the vibration motor.
- Resolution
- Available ADC resolutions for the LTR-381RGB sensor.
Type Aliases§
- Result
- Result type alias for Modulino operations.