Lesson 11 - Tiny House Temperature Monitoring

From Sensors in Schools
Revision as of 22:04, 6 December 2023 by EdmondLascaris (talk | contribs) (Created page with "= Using Python to Monitor Tiny House Temperature = == Using Python to Download Tiny House Temperature Data == <syntaxhighlight lang="python"> # Get Tiny House data for MPPS import dweepy url = dweepy.get_latest_dweet_for('MPPS-Tiny-House-8-bundoora') print(url) </syntaxhighlight> 900px == Put Temperature Data in Variables == <syntaxhighlight lang="python"> # Get Tiny House data for MPPS import dweepy url = dwee...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Using Python to Monitor Tiny House Temperature

Using Python to Download Tiny House Temperature Data

# Get Tiny House data for MPPS

import dweepy

url = dweepy.get_latest_dweet_for('MPPS-Tiny-House-8-bundoora')
print(url)

Put Temperature Data in Variables

# Get Tiny House data for MPPS

import dweepy

url = dweepy.get_latest_dweet_for('MPPS-Tiny-House-8-bundoora')
print(url)

dict = url[0]

internalTemp = dict['content'][('intTemp')]
print(f'The internal temperature is {internalTemp}')

externalTemp = dict['content'][('extTemp')]
print(f'The outside temperature is {externalTemp}')