Home › Forums › Mayfly Data Logger › Calculated Variable Celsius to Fahrenheit DS18 › Reply To: Calculated Variable Celsius to Fahrenheit DS18
In line 237 you don’t need the “new” or anything else with the calcTempF.
Replace new CalcTempF(&ds18, "12345689-abcd-1234-ef00-1234567890ab"),
with just CalcTempF,
You’ve already created and named the variable, so you don’t need to re-create it, just reference it. Actually, since you’ve created all your variables with names, you should reference all of them that way instead of creating a second identical one for each of them. So in your variable array, you can replace almost all of the new ...
with the names you gave the variables in the sensor blocks. The result will look more like the VariableArray in the data saving example: https://github.com/EnviroDIY/ModularSensors/blob/149bb59cdb34f7d54d26cd4a81b7e7a90eabced8/examples/data_saving/data_saving.ino#L318