Sensors Overview - MIMIC Documentation

Sensors Overview

The MimicSensors package provides Python-based sensor emulation modules. Each module simulates the behavior and register map of a real-world sensor, allowing the Mimic hardware bridge to present itself as a genuine device on I2C, SPI, or UART buses.

Supported Sensors

SensorProtocolDescription
MPU6050I2C6-axis accelerometer and gyroscope
BMP280SPI / I2CBarometric pressure and temperature sensor
GPS (NMEA)UARTGPS receiver outputting standard NMEA sentences

Architecture

All sensor modules inherit from the AbstractSensorBase class, which provides:

  • Register Map Management — A dictionary-based register shadow with read/write hooks.
  • Data Generation — Configurable data patterns (static, sinusoidal, random, file-based).
  • Update Loop — A timer-driven update mechanism that refreshes sensor values at configurable rates.

Quick Start

# Emulate an MPU6050 with default settings
mimic simulate mpu6050

# Emulate a BMP280 at a custom update rate
mimic simulate bmp280 --rate 100

# Stream GPS NMEA sentences
mimic simulate gps --trajectory default

Adding Custom Sensors

To create a new sensor module, extend AbstractSensorBase and implement the required methods:

  1. Define the register map
  2. Implement the data generation logic
  3. Register the sensor with the CLI plugin system

See the Abstract Sensor Base chapter for the full API reference.


© Aegion Dynamic