Project tutorial

Know the Temp of Your Home From Anywhere with Arduino Cloud! © CC BY-SA

Ever wanted to know the temperature of your home from somewhere? Here's an easy way to do it with Arduino Cloud and the Yun Shield!

  • 3,754 views
  • 2 comments
  • 13 respects

Components and supplies

Apps and online services

About this project

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

Code

Arduino Cloud Temp

Comments

Similar projects you might like

Pac-Man LED Pixel Panel Costume

Project tutorial by Ben Muller

  • 5,293 views
  • 4 comments
  • 90 respects

LoRa Gateway for DeviceHive

Project tutorial by DeviceHive IoT team

  • 1,395 views
  • 2 comments
  • 18 respects

IoT Bird Feeder with Sigfox and Tweeter

Project showcase by Gaël Porté

  • 495 views
  • 0 comments
  • 8 respects

Raspberry Pi and Arduino Laptop

Project tutorial by Dante Roumega

  • 18,072 views
  • 6 comments
  • 45 respects

Arduino-Based Automatic Guitar Tuner

Project tutorial by Ben Overzat

  • 3,831 views
  • 0 comments
  • 12 respects

Carfox: A Device to Find Them All

Project tutorial by Luis Roda Sánchez

  • 1,646 views
  • 0 comments
  • 13 respects
Add projectSign up / Login