Sentinel
Loading...
Searching...
No Matches
SensorAccelerometer Class Reference

Class for the accelerometer sensor. More...

#include <accelerometer.h>

Public Member Functions

bool begin ()
 Initializes the MPU6500 sensor.
 
void setup ()
 Initializes the MPU6500 sensor with default settings.
 
void update ()
 Updates the accelerometer values.
 
float getZ () const
 Gets the Z value from the accelerometer.
 
float getTotal () const
 Gets the total acceleration from the accelerometer.
 
float getPitch () const
 Gets the pitch from the accelerometer.
 
float getRoll () const
 Gets the roll from the accelerometer.
 

Detailed Description

Class for the accelerometer sensor.

Member Function Documentation

◆ begin()

bool SensorAccelerometer::begin ( )

Initializes the MPU6500 sensor.

Returns
true
false (if initialization fails)

◆ getPitch()

float SensorAccelerometer::getPitch ( ) const

Gets the pitch from the accelerometer.

Returns
float Pitch value

◆ getRoll()

float SensorAccelerometer::getRoll ( ) const

Gets the roll from the accelerometer.

Returns
float Roll value

◆ getTotal()

float SensorAccelerometer::getTotal ( ) const

Gets the total acceleration from the accelerometer.

Returns
float Total acceleration

◆ getZ()

float SensorAccelerometer::getZ ( ) const

Gets the Z value from the accelerometer.

Returns
float Z value

◆ update()

void SensorAccelerometer::update ( )

Updates the accelerometer values.

Updates the accelerometer values and calculates pitch, roll, and total acceleration.


The documentation for this class was generated from the following files: