MRAS
Multi Rocket Avionics System
Loading...
Searching...
No Matches
Sensor_LSM6DSO32.h
1//
2// Created by Tom Danvers on 17/12/2022.
3//
4
5#ifndef MRAS_SENSOR_LSM6DSO32_H
6#define MRAS_SENSOR_LSM6DSO32_H
7
8
9#include "Subsystem.h"
10#include "LSM6DSO32.h"
11#include "Arduino.h"
12#include "SPI.h"
13
14#include "system_messages/AccelerometerDataMsg.h"
15#include "system_messages/GyroDataMsg.h"
16
25private:
26 LSM6DSO32::LSM6DSO32 *lsm;
27public:
36 Sensor_LSM6DSO32(uint8_t id, uint8_t chip_select, SPIClass &spi, uint32_t frequency) : Subsystem(id) {
37 lsm = new LSM6DSO32::LSM6DSO32(chip_select, spi, frequency);
38 }
39
41 delete lsm;
42 }
43
44 int8_t setup() override;
45
46 int8_t loop() override;
47
48 SUBSYSTEM_NAME("LSM6DSO32")
49 SUBSYSTEM_NO_MESSAGE_HANDLER
50};
51
52
53#endif //MRAS_SENSOR_LSM6DSO32_H
A subsystem for the LSM6DSO32 accelerometer and gyroscope.
Definition: Sensor_LSM6DSO32.h:24
Sensor_LSM6DSO32(uint8_t id, uint8_t chip_select, SPIClass &spi, uint32_t frequency)
Construct a new Sensor_LSM6DSO32 object.
Definition: Sensor_LSM6DSO32.h:36
Definition: Subsystem.h:30