Implemented first Hangar-Service
Dependencies: CalibrateMagneto QuaternionMath
Fork of SML2 by
Sensor Class Reference
Base class for I2C-connected sensors. Defines functionality supported by all sensors. More...
#include <Sensor.h>
Inherited by Accelerometer, Barometer, Gyroscope, GyroscopeMPU, and Magnetometer.
Data Structures | |
class | Delegate |
Defines protocol used to send data back to owner. Derive from this class and use Sensor.setDelegate() to receive sensor updates. More... | |
Public Member Functions | |
virtual bool | powerOn ()=0 |
Power on a sensor and make it ready for use. | |
virtual void | powerOff ()=0 |
Power off a sensor. This will generally only put the sensor into deep sleep. | |
virtual void | start ()=0 |
Start continuous data capture. If a delegate is set, its sensorUpdate() method will be called for each data frame. | |
virtual void | stop ()=0 |
Stop capturing data. | |
virtual Vector3 | read ()=0 |
Read and return instantaneous (current) sensor data. No need to start the sensor. |
Detailed Description
Base class for I2C-connected sensors. Defines functionality supported by all sensors.
Definition at line 7 of file Sensor.h.
Member Function Documentation
virtual void powerOff | ( | ) | [pure virtual] |
Power off a sensor. This will generally only put the sensor into deep sleep.
virtual bool powerOn | ( | ) | [pure virtual] |
Power on a sensor and make it ready for use.
- Returns:
- true if power-up was successful, false otherwise.
virtual Vector3 read | ( | ) | [pure virtual] |
Read and return instantaneous (current) sensor data. No need to start the sensor.
virtual void start | ( | ) | [pure virtual] |
Start continuous data capture. If a delegate is set, its sensorUpdate() method will be called for each data frame.
virtual void stop | ( | ) | [pure virtual] |
Stop capturing data.
Generated on Wed Jul 13 2022 08:50:41 by 1.7.2