Constantin
Well-known member
Not a unusual condition for me, but one that I wonder if any can help me with.
I have recently begun to 'libraries' my efforts since the Arduino IDE is somewhat impossible to work with once a program reaches a certain limit. I decided to start with my time work, since there are relatively few routines, variables, and so on. In other words, a good project to start learning libraries with.
However, I am running into one problem: How to let one library use another library to get a temperature measurement. For example, the sensiron library is initiated with
#include <Wire.h> //I2C Communications
#include <LibHumidity.h> //Temperature and Humidity Library for SHT-21 sensors
LibHumidity SHT21 = LibHumidity(0); // Initiate Temperature and Humidity Library Functions
I'd love to be able to use Libhumidity functions such as SHT21.GetTemperatureC() from within my time libraries. However, so far I've only done a great job of messing this up. See http://playground.arduino.cc/code/Sensirion for more info about the Sensiron humidity/temperature library.
I suppose an option is to simply import everything associated with getting a temperature from the Libhumidity library and calling it a day, but I'd like to keep the two separate, if possible.
I have recently begun to 'libraries' my efforts since the Arduino IDE is somewhat impossible to work with once a program reaches a certain limit. I decided to start with my time work, since there are relatively few routines, variables, and so on. In other words, a good project to start learning libraries with.
However, I am running into one problem: How to let one library use another library to get a temperature measurement. For example, the sensiron library is initiated with
#include <Wire.h> //I2C Communications
#include <LibHumidity.h> //Temperature and Humidity Library for SHT-21 sensors
LibHumidity SHT21 = LibHumidity(0); // Initiate Temperature and Humidity Library Functions
I'd love to be able to use Libhumidity functions such as SHT21.GetTemperatureC() from within my time libraries. However, so far I've only done a great job of messing this up. See http://playground.arduino.cc/code/Sensirion for more info about the Sensiron humidity/temperature library.
I suppose an option is to simply import everything associated with getting a temperature from the Libhumidity library and calling it a day, but I'd like to keep the two separate, if possible.