Accelerometer#

Hardware Interface#

Defined in namespace hal

#include <libhal/accelerometer.hpp>

class accelerometer#

Acceleration sensing hardware abstraction interface.

Subclassed by hal::soft::inert_accelerometer

Public Functions

inline read_t read()#

Read the latest acceleration sensed by the device.

Returns:

read_t - acceleration data

struct read_t#

Result from reading the accelerometer.

Public Members

g_force x#

Acceleration in the X axis, relative to the device’s reference frame.

g_force y#

Acceleration in the Y axis, relative to the device’s reference frame.

g_force z#

Acceleration in the Z axis, relative to the device’s reference frame.