Home › Forums › Mayfly Data Logger › Adding New Sensors to Modular Sensors › Reply To: Adding New Sensors to Modular Sensors
The “best” way to work with ModularSensors would be to write the c/h files and submit them as a pull request. 🙂 But if the calculated variable is working, then feel free to keep using it that way for yourself.
If you define your variable for the DS18 temperature as something like Variable* ds18Temp = new MaximDS18_Temp(&ds18, "12345678-abcd-1234-ef00-1234567890ab);
then in your calculation equation you would use something like
float ds18TempVal = ds18Temp ->getValue();
The “baro_rho_correction” example is probably the best one to look at to see something similar in action: https://github.com/EnviroDIY/ModularSensors/blob/master/examples/baro_rho_correction/baro_rho_correction.ino