Hubo Library

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Functions
Miscellaneous helper functions

## Functions
void | HuboLib::VersionInfo ()
| Prints version information and other stuff regarding to the library to the console. More...
double | HuboLib::Get_MCP9701_Temperature (double volt)
| Converts a voltage value of an MCP9701 temperature sensor into the equivalent temperature. More...
double | HuboLib::Get_MCP9700_Temperature (double volt)
| Converts a voltage value of an MCP9700 temperature sensor into the equivalent temperature. More...
bool | HuboLib::GetSlaveDeviceList (std::vector< int > &slaveAddressList)
| Returns the list of I2C addresses of the MCP23017 slaves. More...
unsigned long long | HuboLib::GetTime_MicroSeconds ()
| Returns the number of micro seconds. More...
void | HuboLib::Delay_MicroSeconds (unsigned long delay_micros)
| delays the execution of the calling thread for the given number of micro seconds. More...

## Detailed Description

## Function Documentation

void HuboLib::Delay_MicroSeconds | ( | unsigned long | delay_micros | ) |

delays the execution of the calling thread for the given number of micro seconds.

Use this function to suspend a thread for the number of µs. While µsleep() does have an overhead of 100µs-300µs this function "will hard wait" remainder delays not greater than 300µs in a loop - thus achieving results "as accurate as possible".

Parameters

  delay_micros | The time in µs to suspend the calling thread.

See also
  For an example on how to use Delay_MicroSeconds() refer to the demos GPIOInputOutput.cpp and RCSocket.cpp.

Note
  This call does not require a prior initialization of the library.

double HuboLib::Get_MCP9700_Temperature | ( | double | volt | ) |

Converts a voltage value of an MCP9700 temperature sensor into the equivalent temperature.

Use this function to convert the voltage of a MCP7900 temperature sensor into its equivalent temperature given in °C.
Note that no checks are being made for the voltage ranges that are specified in the data sheet of the sensor. Thus just any voltage value would result in "some" temperature.

Parameters

  volt | The voltage of the output of the sensor.

Returns
  The temperature calculated from the voltage of the sensor.

See also
  For a simple example on how to call Get_MCP7900_Temperature() refer to the demo MCP790x.cpp.

Note
  This call does not require a prior initialization of the library. It is highly recomended to perform a calibration of the sensors!

double HuboLib::Get_MCP9701_Temperature | ( | double | volt | ) |

Converts a voltage value of an MCP9701 temperature sensor into the equivalent temperature.

Use this function to convert the voltage of a MCP7901 temperature sensor into its equivalent temperature given in °C.
Note that no checks are being made for the voltage ranges that are specified in the data sheet of the sensor. Thus just any voltage value would result in "some" temperature.

Parameters

  volt | The voltage of the output of the sensor.

Returns
  The temperature calculated from the voltage of the sensor.

See also
  For a simple example on how to call Get_MCP7901_Temperature() refer to the demo MCP790x.cpp.

Note
  This call does not require a prior initialization of the library.

bool HuboLib::GetSlaveDeviceList | ( | std::vector< int > & | slaveAddressList | ) |

Returns the list of I2C addresses of the MCP23017 slaves.

Use this function to retrieve a list of all MCP23017 IO expanders that are cascaded to the Hubo master module.

Parameters

  slaveAddressList | The list containing the I2C addresses detected.

Returns
  True if the function succeeded and at least one slave could be found.

Note
  This call does not require a prior initialization of the library. However, the results are only valid after a call to Initialize().

unsigned long long HuboLib::GetTime_MicroSeconds | ( |  | ) |

Returns the number of micro seconds.

Use this function to retrieve the number of µs regardless of timezone changes, daylight saving...

Returns
  The number of µs.

See also
  For an example on how to use GetTime_MicroSeconds() refer to the demos GPIOInputOutput.cpp and RCSocket.cpp.

Note
  This call does not require a prior initialization of the library.

void HuboLib::VersionInfo | ( |  | ) |

Prints version information and other stuff regarding to the library to the console.

Use this function to get information of the version of the library and other stuff.

See also
  For a simple example on how to call VersionInfo() refer to the demo VersionInfo.cpp.

Note
  This call does not require a prior initialization of the library.