Adafruit HMC5883 Unified Library
Public Member Functions | List of all members
Adafruit_HMC5883_Unified Class Reference

Unified sensor driver for the magnetometer ///. More...

#include <Adafruit_HMC5883_U.h>

Inheritance diagram for Adafruit_HMC5883_Unified:

Public Member Functions

 Adafruit_HMC5883_Unified (int32_t sensorID=-1)
 Instantiates a new Adafruit_HMC5883 class. More...
 
bool begin (void)
 Setups the HW. More...
 
void setMagGain (hmc5883MagGain gain)
 Sets the magnetometer's gain. More...
 
bool getEvent (sensors_event_t *)
 Gets the most recent sensor event. More...
 
void getSensor (sensor_t *)
 Gets the sensor_t data.
 

Detailed Description

Unified sensor driver for the magnetometer ///.

Constructor & Destructor Documentation

◆ Adafruit_HMC5883_Unified()

Adafruit_HMC5883_Unified::Adafruit_HMC5883_Unified ( int32_t  sensorID = -1)

Instantiates a new Adafruit_HMC5883 class.

Parameters
sensorIDsensor ID, -1 by default

Member Function Documentation

◆ begin()

bool Adafruit_HMC5883_Unified::begin ( void  )

Setups the HW.

Returns
Returns whether connection was successful

◆ setMagGain()

void Adafruit_HMC5883_Unified::setMagGain ( hmc5883MagGain  gain)

Sets the magnetometer's gain.

Parameters
gainDesired magnetic gain

◆ getEvent()

bool Adafruit_HMC5883_Unified::getEvent ( sensors_event_t *  event)

Gets the most recent sensor event.

Returns
Returns the most recent sensor event

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