Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- import sys
- from twython import Twython
- import os
- CONSUMER_KEY = '***REPLACE WITH YOUR OWN*****'
- CONSUMER_SECRET = '***REPLACE WITH YOUR OWN*****'
- ACCESS_KEY = '***REPLACE WITH YOUR OWN*****'
- ACCESS_SECRET = '***REPLACE WITH YOUR OWN*****'
- api = Twython(CONSUMER_KEY,CONSUMER_SECRET,ACCESS_KEY,ACCESS_SECRET)
- cmd = '/opt/vc/bin/vcgencmd measure_temp'
- line = os.popen(cmd).readline().strip()
- temp = line.split('=')[1].split("'")[0]
- api.update_status(status='My current CPU temperature is '+temp+' C')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement