In this project I'll show you an easy way to see the temperature of your house from anywhere, using a TMP36, the Arduino Yun Shield and Arduino Cloud!How to make it
The build is really easy. First you'll need to put the Yun Shield on your Arduino of choice, then connect the TMP36 to 5v and GND, and connect the signal pin to A0.Setting up Arduino Cloud
You'll need to go to cloud.arduino.cc and create a new thing and call it TempPanel. Then create a new property and call it Temp. Set the type as either Fahrenheit or Celsius, and then for policy choose "Update when the value changes".The Code
In the code, we send the TMP36 values to Arduino Cloud, however, it can sometimes be annoying to include the code for converting the analog values to a temperature scale in every sketch that has a TMP36, so I wrote a library that does it for you!(You will need to install this) You can download it from the Arduino Library manager, just search "TMP36" and it should be the only one, by me(Isaac100). You can learn more about it on the Github page. You will also need to install the Arduino Cloud library.
I provide a sketch down below, but you will need to make a few edits first. At this line:
const char userName = "Username";
Put in your Arduino Username. At these lines:
const char thingId = "thingID"; const char thingPsw = "thingPsw";
Put in your Thing ID and Password, which you can find by clicking on the info tab on Arduino Cloud(Looks like a gear). At these lines:
//TempPanel.addProperty("Temp", TEMPERATURE_F, R); //Uncomment for Fahrenheit //TempPanel.addProperty("Temp", TEMPERATURE_C, R); //Uncomment for Celsius
Uncomment either the first or second line to determine which temperature scale to use. Do the same here:
//float temp = myTMP36.getTempF(); //Uncomment for Fahrenheit //float temp = myTMP36.getTempC(); //Uncomment for Celsius
Upload the code and if everything works fine, on Arduino Cloud a message sould pop up that says "TempPanel is online" and you should see the temperature.
House and TMP36 images are CC BY-SA