Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY? Start here

Reply To: Calculated Variable Celsius to Fahrenheit DS18

Home Forums Mayfly Data Logger Calculated Variable Celsius to Fahrenheit DS18 Reply To: Calculated Variable Celsius to Fahrenheit DS18

Sara Damiano

The C-to-F is working for me with this calculation function:

And this variableArray:

But I don’t have a BME280 on my desk so I commented out all of that code to get it to work. I also don’t have a working XBee3 right now, so I couldn’t test with that. I don’t think those would interfere, but I’m just warning you that my testing isn’t exactly what you have.

Are you planning to keep the code for displaying on the little screen? You could simplify your code by removing all of the extra code for the BME280 and then displaying the result of the BME280 by using the variables you created for it for the logger. So, replace display.print("T: "); display.print(sensors.getTempCByIndex(0)); display.println(" C"); with display.print("T: "); display.print(bme280Temp->getValueString()); display.println(" C"); and so forth. If you want, on Monday I can write up a simpler version for you following that model.