Hall Effect sensor Library 1.0.0
Hall Effect Sensor library (Analog and Digital, regular and EasyC)
Loading...
Searching...
No Matches
HallEffect_Analog Class Reference

Base class Analog Hall Effect Sensor. More...

#include <Hall-Effect-Analog-SOLDERED.h>

Public Member Functions

 HallEffect_Analog (int _pin)
 Constructor of HallEffect_Analog.
 
uint16_t getReading ()
 Reads hall effect sensor value.
 
float getMilliTeslas ()
 Reads hall effect calculated milli Teslas value.
 

Private Attributes

int pin
 

Detailed Description

Base class Analog Hall Effect Sensor.

Constructor & Destructor Documentation

◆ HallEffect_Analog()

HallEffect_Analog::HallEffect_Analog ( int _pin)

Constructor of HallEffect_Analog.

Parameters
int_pin Pin of the sensor (has to support analogRead)

Member Function Documentation

◆ getMilliTeslas()

float HallEffect_Analog::getMilliTeslas ( )

Reads hall effect calculated milli Teslas value.

Note
The reading is calculated differently depending on your board's ADC. You may need to adjust the calculation.
Returns
float value of calculated milli Teslas

◆ getReading()

uint16_t HallEffect_Analog::getReading ( )

Reads hall effect sensor value.

Returns
Returns a unit16_t sensor reading value.

Member Data Documentation

◆ pin

int HallEffect_Analog::pin
private

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