Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- import os
- import sys
- import tweepy
- CONSUMER_KEY = ''
- CONSUMER_SECRET = ''
- ACCESS_KEY = ''
- ACCESS_SECRET = ''
- auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
- auth.set_access_token(ACCESS_KEY, ACCESS_SECRET)
- api = tweepy.API(auth)
- cmd = '/opt/vc/bin/vcgencmd measure_temp'
- line = os.popen(cmd).readline().strip()
- temp = line.split('=')[1].split("'")[0]
- api.update_status('My current home automation Raspberry Pi temperature is: '+ temp)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement