M5Unit-IMU 0.0.2 git rev:e5b00aa
Loading...
Searching...
No Matches
unit_mini_imu_pro.hpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2026 M5Stack Technology CO LTD
3 *
4 * SPDX-License-Identifier: MIT
5 */
10#ifndef M5_UNIT_IMU_UNIT_UNIT_MINI_IMU_PRO_HPP
11#define M5_UNIT_IMU_UNIT_UNIT_MINI_IMU_PRO_HPP
12
13#include <M5UnitComponent.hpp>
14#include <M5UnitUnifiedENV.h> // UnitBMP280 is provided by M5Unit-ENV (the barometer drivers live there)
16
17namespace m5 {
18namespace unit {
19
30class UnitMiniIMUPro : public Component {
31 M5_UNIT_COMPONENT_HPP_BUILDER(UnitMiniIMUPro, 0xFF /* dummy: parent has no device of its own */);
32
33public:
36 explicit UnitMiniIMUPro(const uint8_t bmi_addr = 0x68);
39 {
40 }
41
45 {
46 return _bmi;
47 }
49 UnitBMP280& baro()
50 {
51 return _baro;
52 }
53
55 virtual bool begin() override
56 {
57 return _valid;
58 }
59
60protected:
61 // Share this composite's bus with each child, duplicated at the child's address
62 virtual std::shared_ptr<Adapter> ensure_adapter(const uint8_t ch) override;
63
64private:
66 UnitBMP280 _baro;
67 bool _valid{};
68};
69
70} // namespace unit
71} // namespace m5
72#endif
BMI270 that switches on its auxiliary (AUX) interface and drives a BMM150 through it.
Definition unit_bmi270_aux_bmm150.hpp:49
6-axis (accel + gyro) IMU unit. CoreS3/AtomS3R built-in
Definition unit_bmi270.hpp:34
Unit Mini IMU-Pro (U171): BMI270 (0x68, fixed – no address switch) + BMP280 (0x76) on the GROVE main ...
Definition unit_mini_imu_pro.hpp:30
virtual ~UnitMiniIMUPro()
Destructor.
Definition unit_mini_imu_pro.hpp:38
UnitBMI270 & imu()
Accel/gyro/mag sub-unit (add to an AhrsController; the magnetometer arrives through this unit's AUX B...
Definition unit_mini_imu_pro.hpp:44
UnitMiniIMUPro(const uint8_t bmi_addr=0x68)
Construct with the BMI270's I2C address (the composite children derive from this)
Definition unit_mini_imu_pro.cpp:23
virtual bool begin() override
Begin: children are begun by the framework (all on the shared bus, any order)
Definition unit_mini_imu_pro.hpp:55
UnitBMP280 & baro()
Barometer sub-unit (read directly; not AHRS-fused)
Definition unit_mini_imu_pro.hpp:49
Top level namespace of M5Stack.
Definition ahrs_controller.cpp:26
Unit-related namespace.
UnitBMI270AuxBMM150 (BMI270 driving a magnetometer over its auxiliary interface)