Okay, so far this tutorial was quite European based. But you might want to have your data in Fahrenheit. There are two ways of doing this: In the arduino software or in the spreadsheet software. Because I left you with the spreadsheet software Calc in the last post, we will first do it this way. The formula to convert Celsius into Fahrenheit is to multiply the temperature in Celsius by 1.8 and then add 32.
In our spreadsheet software we add a new column and write the formula “=D1*1.8 + 32” for the first of our temperature values in D1:
Like last time we want a formula to apply for all our data so we write the first and the last cell into our address field, this time it’s “C1:C8484”:
Don’t forget to hit the enter/return key after you wrote this. Now we choose again the “fill–>down” option from our “edit” menu:
But our graph is still in Celsius? Don’t worry, we will fix that now. We double-click our diagramm and then go to our “format” menu to choose “data range”.
Here we can choose to add and remove columns. If we want to ditch the Celsius, we click on the column D and change the D into a C in the formula:
We see that the column D is now displayed as column C and in the graph we have the Fahrenheit values instead of the Celsius values. If we want to add the Celsius values to the graph again, we choose the Y-values, then “add” and change the “unknown data” to the column with the Celsius values:
By the way, if the color of our graph bothers us, we can change that by double-clicking the line and change the color to whatever we like:
And if we want the Fahrenheit right from the start in our Arduino code? well, search for this line:
// Read temperature as Celsius
float t = dht.readTemperature();
And change it to:
// Read temperature as Fahrenheit
float t = dht.readTemperature(true);
What? That simple? Yep, the “true” tells the library that you want the temperature values in Fahrenheit. If this value isn’t set or you write dht.readTemperature(false) it shows the value in Celsius. Easy!
Even if you change it in the software, you might like to keep the two conversion formulas in the back of your mind in case you are exchanging temperature data with partners in the U.S. or in other parts of the world:
degree Fahrenheit (°F) = degree Celsius (°C) × 1,8 + 32
degree Celsius (°C) = (degree Fahrenheit (°F) − 32) / 1,8
In the next part we will do some more awesome things with our data, so stay tuned.
Keep your climate lines straight!
Weitere Beiträge zu diesem Projekt:
- Build Your Own Data Logger – Investigating Your Climate Graphs
- Build Your Own Data Logger – We Want Fahrenheit!
- Build Your Own Data Logger – Processing Data With Microsoft Excel
- Build Your Own Data Logger – Processing Data with OpenOffice Calc
- Build Your Own Data Logger – The Software, Telling the Logger to Log
- Build Your Own Data Logger – Arduino, the Datalogger-Shield and the Wiring
- Build Your Own Data Logger – The Sensor, Heart of the Logger
- Build Your Own Data Logger – Quick Start Guide
This post is also available in: German