|
SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
|
@license MIT License More...
#include <Arduino.h>#include <Wire.h>#include <SPI.h>#include "SensorQMI8658.hpp"Go to the source code of this file.
Macros | |
| #define | SPI_MOSI (35) |
| #define | SPI_SCK (36) |
| #define | SPI_MISO (37) |
| #define | IMU_CS 34 |
| #define | IMU_IRQ 33 |
| #define | OLED_SDA 22 |
| #define | OLED_SCL 21 |
Functions | |
| void | beginPower () |
| void | setup () |
| void | loop () |
Variables | |
| SensorQMI8658 | qmi |
| const uint16_t | buffer_size = 128 |
| IMUdata | accel [buffer_size] |
| IMUdata | gyro [buffer_size] |
| bool | disable_fifo = false |
| uint32_t | timestamp = 0 |
@license MIT License
Copyright (c) 2024 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 qmi8658_read_from_fifo_deprecated.ino.
| #define IMU_CS 34 |
Definition at line 65 of file qmi8658_read_from_fifo_deprecated.ino.
| #define IMU_IRQ 33 |
Definition at line 72 of file qmi8658_read_from_fifo_deprecated.ino.
| #define OLED_SCL 21 |
Definition at line 80 of file qmi8658_read_from_fifo_deprecated.ino.
| #define OLED_SDA 22 |
Definition at line 76 of file qmi8658_read_from_fifo_deprecated.ino.
| #define SPI_MISO (37) |
Definition at line 61 of file qmi8658_read_from_fifo_deprecated.ino.
| #define SPI_MOSI (35) |
Definition at line 53 of file qmi8658_read_from_fifo_deprecated.ino.
| #define SPI_SCK (36) |
Definition at line 57 of file qmi8658_read_from_fifo_deprecated.ino.
| void beginPower | ( | ) |
Definition at line 92 of file qmi8658_read_from_fifo_deprecated.ino.
Referenced by setup().
| void loop | ( | ) |
Definition at line 265 of file qmi8658_read_from_fifo_deprecated.ino.
References accel, buffer_size, SensorQMI8658::configFIFO(), disable_fifo, SensorQMI8658::FIFO_MODE_BYPASS, gyro, i, SensorQMI8658::isEnableAccelerometer(), SensorQMI8658::isEnableGyroscope(), qmi, SensorQMI8658::readFromFifo(), timestamp, x, and y.
| void setup | ( | ) |
Definition at line 106 of file qmi8658_read_from_fifo_deprecated.ino.
References SensorQMI8658::ACC_ODR_1000Hz, SensorQMI8658::ACC_RANGE_4G, ComplexDeviceWithHal::begin(), beginPower(), SensorQMI8658::configAccelerometer(), SensorQMI8658::configFIFO(), SensorQMI8658::configGyroscope(), SensorQMI8658::enableAccelerometer(), SensorQMI8658::enableGyroscope(), SensorQMI8658::enableINT(), SensorQMI8658::FIFO_MODE_FIFO, SensorQMI8658::FIFO_SAMPLES_128, SensorQMI8658::getChipID(), SensorQMI8658::GYR_ODR_896_8Hz, SensorQMI8658::GYR_RANGE_64DPS, IMU_CS, SensorQMI8658::INTERRUPT_PIN_1, SensorQMI8658::INTERRUPT_PIN_2, SensorQMI8658::LPF_MODE_0, qmi, SENSOR_SCL, SENSOR_SDA, SPI_MISO, SPI_MOSI, SPI_SCK, and timestamp.
| IMUdata accel[buffer_size] |
Definition at line 87 of file qmi8658_read_from_fifo_deprecated.ino.
| const uint16_t buffer_size = 128 |
Definition at line 86 of file qmi8658_read_from_fifo_deprecated.ino.
Referenced by loop(), and SensorQMI8658::readFromFifo().
| bool disable_fifo = false |
Definition at line 89 of file qmi8658_read_from_fifo_deprecated.ino.
Referenced by loop().
| IMUdata gyro[buffer_size] |
Definition at line 88 of file qmi8658_read_from_fifo_deprecated.ino.
Referenced by loop(), SensorQMI8658::readFromFifo(), and setup().
| SensorQMI8658 qmi |
Definition at line 84 of file qmi8658_read_from_fifo_deprecated.ino.
| uint32_t timestamp = 0 |
Definition at line 90 of file qmi8658_read_from_fifo_deprecated.ino.
Referenced by SensorQMI8658::getTimestamp(), SensorRTC::hwClockRead(), loop(), parse_euler_data(), parse_quaternion(), and setup().