|
SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
|
@license MIT License More...
#include <AccelerometerDrv.hpp>Go to the source code of this file.
Macros | |
| #define | SENSOR_SDA 21 |
| #define | SENSOR_SCL 22 |
| #define | SENSOR_IRQ 39 |
Functions | |
| void | setup () |
| void | loop () |
Variables | |
| SensorBMA423 | accelSensor |
| volatile bool | isInterruptTriggered = false |
@license MIT License
Copyright (c) 2026 lewis he
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Definition in file bma423_accelerometer.ino.
| #define SENSOR_IRQ 39 |
Definition at line 40 of file bma423_accelerometer.ino.
| #define SENSOR_SCL 22 |
Definition at line 36 of file bma423_accelerometer.ino.
| #define SENSOR_SDA 21 |
Definition at line 32 of file bma423_accelerometer.ino.
| void loop | ( | ) |
Definition at line 106 of file bma423_accelerometer.ino.
References accelSensor, SensorBMA4XX::getTimeSampleMs(), SensorBMA4XX::isDataReady(), AccelerometerData::mps2, AccelerometerData::raw, SensorBMA4XX::readData(), AccelerometerData::temperature, SensorVector::x, RawVector::x, SensorVector::y, RawVector::y, SensorVector::z, and RawVector::z.
| void setup | ( | ) |
Definition at line 47 of file bma423_accelerometer.ino.
References accelSensor, ComplexStaticDeviceWithHal::begin(), CIC_AVG_MODE, SensorBMA4XX::configAccelerometer(), SensorBMA423::enableDataReady(), FS_2G, SensorBMA4XX::getModelName(), isInterruptTriggered, NORMAL, OSR2_AVG2, SENSOR_IRQ, SENSOR_SCL, SENSOR_SDA, SensorBMA4XX::setRemapAxes(), and TOP_LAYER_RIGHT_CORNER.
| SensorBMA423 accelSensor |
Definition at line 43 of file bma423_accelerometer.ino.
| volatile bool isInterruptTriggered = false |
Definition at line 45 of file bma423_accelerometer.ino.
Referenced by setup().