Things used in this project

Hardware components:
Pi 3 02
Raspberry Pi 3 Model B
×1
12002 04
Breadboard (generic)
×1
11026 02
Jumper wires (generic)
×1
Adafruit industries ada592 image 75px
USB-A to Micro-USB Cable
×1
Software apps and online services:
Ubidots
Ubidots
Hand tools and fabrication machines:
09507 01
Soldering iron (generic)

Schematics

Circuit Diagram
This is the circuit diagram for the waterproof temperature sensor.
Circuit%20temp

Code

Send Temperature to UbidotsPython
from ubidots import ApiClient
import math
import time

# Create an ApiClient object

api = ApiClient(token='4UgSQeNxI5NRkFLgyk5uJopGAuTrHB')

# Get a Ubidots Variable

variable = api.get_variable('571d0bda762542210fde6a16')

# Here is where you usually put the code to capture the data, either through your GPIO pins or as a calculation.

import time

while 1:
    tempfile = open("/sys/bus/w1/devices/28-0115a51c4bff/w1_slave")
    thetext = tempfile.read()
    tempfile.close()
    tempdata = thetext.split("\n")[1].split(" ")[9]
    temperature = float(tempdata[2:])
    temperature = temperature / 1000
    temperature = (temperature * 9/5) + 32
    response = variable.save_value({"value": (temperature)})
    print response
    time.sleep(1)

Credits

8695447e796b493954f0f0aa0cd843fe
Philip Bridges
1 project • 2 followers
I am a current student at the University of North Carolina at Charlotte pursuing a bachelor's in Mechanical Engineering.
Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Sign up / LoginProjectsPlatformsTopicsContestsLiveAppsBetaBlog