Sign In SIGN UP UPGRADE

Electric Imp + TMP36 Temperature Sensor

TMP36 Temperature Sensor splash image

Getting started

The Electric Imp is a really unique microcontroller. It's really simple to set up WIFI and get it talking to the cloud. We'll show you how to hook up a temperature sensor to your Imp, and start visualizing some data! We'll be using the plotly REST API, and a simple HTTP request library on the IMP. If you have any issues, don't hesistate to reach out to the Plotly Community!

Materials

  • Electric Imp
  • Electric Imp breakout board (April board or Sparkfun board)
  • TMP36 temperature sensor
  • Hookup wires
  • Half-size breadboard
TMP36 Temperature Sensor Parts

Hooking it up

TMP36 PIN1 Imp 3.3V
TMP36 PIN2 Imp GND
TMP36 PIN2 Imp A8

TMP36 Temperature Sensor hookup

Software

Grab the Agent and Device .nuts here:

The script

Copy and paste the Agent and Device nuts to the respective section in the Electric Imp IDE. Don't forget to change the user credentials in the agent.nut payload to your own!

local payload = {
    un = "username",
    key = "api_key",
    origin = "plot",
    platform = "electricimp",
    args = http.jsonencode(data),
    kwargs = http.jsonencode(layout),
    version = "0.0.1"
};

Wrapping it up

Save and run the code! You'll get a URL for your graph in the Imp's console. Check it out to see your data!