MakeBlock Drive Updated Updated library for MakeBlock Ranger

Loading...
Searching...
No Matches
Public Member Functions | List of all members
MeHumiture Class Reference

Driver for humiture sensor device. More...

`#include <src/MeHumitureSensor.h>`

Inheritance diagram for MeHumiture:
[legend]
Collaboration diagram for MeHumiture:
[legend]

## Public Member Functions
| MeHumiture (void)
| MeHumiture (uint8_t port)
void | setpin (uint8_t port)
void | update (void)
uint8_t | getHumidity (void)
uint8_t | getTemperature (void)
uint8_t | getValue (uint8_t index)
double | getFahrenheit (void)
double | getKelvin (void)
double | getdewPoint (void)
double | getPointFast (void)
Public Member Functions inherited from MePort
| MePort (void)
| MePort (uint8_t port)
| MePort (uint8_t port, uint8_t slot)
uint8_t | getPort (void)
uint8_t | getSlot (void)
bool | dRead1 (uint8_t mode=INPUT)
bool | dRead2 (uint8_t mode=INPUT)
bool | dpRead1 (void)
bool | dpRead2 (void)
void | dWrite1 (bool value)
void | dWrite2 (bool value)
int16_t | aRead1 (void)
int16_t | aRead2 (void)
void | aWrite1 (int16_t value)
void | aWrite2 (int16_t value)
void | reset (uint8_t port)
void | reset (uint8_t port, uint8_t slot)
uint8_t | pin1 (void)
uint8_t | pin2 (void)
uint8_t | pin (void)
uint8_t | pin (uint8_t port, uint8_t slot)

## Additional Inherited Members
Protected Attributes inherited from MePort
uint8_t | s1
uint8_t | s2
uint8_t | _port
uint8_t | _slot

## Detailed Description

Driver for humiture sensor device.

Class: MeHumiture

Description
  Declaration of Class MeHumiture.

Copyright (C), 2012-2016, MakeBlock

## Constructor & Destructor Documentation

## ◆ MeHumiture() [1/2]

MeHumiture::MeHumiture | ( | void |  | ) |

Alternate Constructor which can call your own function to map the humiture sensor to arduino port, no pins are used or initialized here.

Parameters

  [in] | None |

## ◆ MeHumiture() [2/2]

MeHumiture::MeHumiture | ( | uint8_t | port | ) |

Alternate Constructor which can call your own function to map the temperature sensor to arduino port, the slot2 pin will be used here since specify slot is not be set.

Parameters

  [in] | port | - RJ25 port from PORT_1 to M2

## Member Function Documentation

## ◆ getdewPoint()

double MeHumiture::getdewPoint | ( | void |  | ) |

Function
  dewPoint

Description
  The dew-point temperature (Point at this temperature, the air is saturated and produce dew).

Parameters

  [in] | celsius | - The celsius degrees of air.
  [in] | humidity | - The humidity of air.

Output
  None

Return
  Return the dew-point of air.

Others
  None

## ◆ getFahrenheit()

double MeHumiture::getFahrenheit | ( | void |  | ) |

Function
  Fahrenheit

Description
  Change celsius degrees into Fahrenheit.

Parameters

  [in] | celsius | - The number of celsius degrees.

Output
  None

Return
  Return the number of Fahrenheit

Others
  None

## ◆ getHumidity()

uint8_t MeHumiture::getHumidity | ( | void |  | ) |

Function
  getHumidity

Description
  Use this function to Get the Humidity data

Output
  None

Returns
  The value of Humidity

Others
  None

## ◆ getKelvin()

double MeHumiture::getKelvin | ( | void |  | ) |

Function
  Kelvin

Description
  Change celsius degrees into Kelvin.

Parameters

  [in] | celsius | - The number of celsius degrees.

Output
  None

Return
  Return the number of Kelvin temperature.

Others
  None

## ◆ getPointFast()

double MeHumiture::getPointFast | ( | void |  | ) |

Function
  dewPointFast

Description
  Fast calculating dew point, Speed is 5 times to dewPoint().

Parameters

  [in] | celsius | - The celsius degrees of air.
  [in] | humidity | - The humidity of air.

Output
  None

Return
  Return the Fast calculating dew point of air.

Others
  None

Function
  dewPointFast

Description
  Fast calculating dew point, peed is 5 times to dewPoint().

Parameters

  [in] | celsius | - The celsius degrees of air.
  [in] | humidity | - The humidity of air.

Output
  None

Return
  Return the Fast calculating dew point of air.

Others
  None

## ◆ getTemperature()

uint8_t MeHumiture::getTemperature | ( | void |  | ) |

Function
  getTemperature

Description
  Use this function to Get the Temperature data

Output
  None

Returns
  The value of Temperature

Others
  None

## ◆ getValue()

uint8_t MeHumiture::getValue | ( | uint8_t | index | ) |

Function
  getValue

Description
  Use this function to Get the Temperature data or Humidity data

Parameters

  [in] | index | - The value '0' means get the value of Humidity data and '1' used to get the Temperature data.

Output
  None

Returns
  The value of Temperature

Others
  None

## ◆ setpin()

void MeHumiture::setpin | ( | uint8_t | port | ) |

Function
  setpin

Description
  Reset available PIN for temperature sensor by its arduino port.

Parameters

  [in] | port | - arduino port(should digital pin)

Output
  None

Returns
  None

Others
  None

## ◆ update()

void MeHumiture::update | ( | void |  | ) |

Function
  update

Description
  Use this function to update the sensor data

Output
  None

Returns
  None

Others
  None

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

- src/MeHumitureSensor.h
- src/MeHumitureSensor.cpp