Zoltan Hudak / HMC1501
Embed: (wiki syntax)

« Back to documentation index

HMC1501 Class Reference

HMC1501 Class Reference

A class to work with a HMC1501 magnetic angular sensor. More...

#include <HMC1501.h>

Public Member Functions

 HMC1501 (float minV, float maxV)
 Creates an HMC1501 object.
float getAmplitude ()
 Amplitude in mV.
float getOffset ()
 Offset in mV.
float angle (float mV)
 Angle in degree [°].

Detailed Description

A class to work with a HMC1501 magnetic angular sensor.

Definition at line 26 of file HMC1501.h.


Constructor & Destructor Documentation

HMC1501 ( float  minV,
float  maxV 
)

Creates an HMC1501 object.

Creates a HMC1501 object.

Parameters:
minVMinimum voltage measured in mV when rotating a magnet.
maxVMaximum voltage measured in mV when rotating a magnet.
Note:
Minimum and maximum voltages shall be measured by rotating the magnet
Parameters:
minVMinimum voltage [mV]
maxVMaximum voltage [mV]

Definition at line 30 of file HMC1501.cpp.


Member Function Documentation

float angle ( float  mV )

Angle in degree [°].

Note:
theta = arcsin(Volt) / 2 [rad]
Parameters:
Inputvoltage in mV
Return values:
Anglein degree [°]
Note:
theta = arcsin(Volt) / 2 [rad]
Parameters:
Inputvoltage in mV [mV]
Return values:
Anglein degree [°]

Definition at line 44 of file HMC1501.cpp.

float getAmplitude (  )

Amplitude in mV.

Note:
Ampliture is equal to the half of peak-to-peak calculated from minV, maxV
Return values:
Amplitudein mV

Definition at line 41 of file HMC1501.h.

float getOffset (  )

Offset in mV.

Note:
Input offset calculated from minV, maxV
Return values:
Offsetin mV

Definition at line 48 of file HMC1501.h.