This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function streamDataTime(signalName, value, timestamp, enable) { | |
if (!signalName) { | |
signalName = 'UnknownData'; | |
} | |
var headersIS = { | |
'X-IS-AccessKey': 'PLACE YOUR ACCESS KEY HERE', | |
'X-IS-BucketKey': 'PLACE YOUR BUCKET KEY HERE', | |
'Accept-Version': '~0' | |
} | |
var data = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function streamData(signalName, value, enable) { | |
var accessKey = 'PLACE YOUR ACCESS KEY HERE'; | |
var bucketKey = 'PLACE YOUR BUCKET KEY HERE'; | |
if (!signalName) { | |
signalName = 'UnknownData'; | |
} | |
if (enable) { | |
var url = 'https://groker.init.st/api/events?accessKey=' + accessKey + '&bucketKey=' + bucketKey + '&' + encodeURIComponent(signalName) + '=' + encodeURIComponent(value); | |
UrlFetchApp.fetch(url); | |
return signalName + '=' + value; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"latitude":42.3601, | |
"longitude":-71.0589, | |
"timezone":"America/New_York", | |
"currently":{ | |
"time":1528402806, | |
"summary":"Mostly Cloudy", | |
"icon":"partly-cloudy-day", | |
"nearestStormDistance":2, | |
"nearestStormBearing":164, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from subprocess import PIPE, Popen | |
import psutil | |
import time | |
from ISStreamer.Streamer import Streamer | |
def get_cpu_temperature(): | |
process = Popen(['vcgencmd', 'measure_temp'], stdout=PIPE) | |
output, _error = process.communicate() | |
return float(output[output.index('=') + 1:output.rindex("'")]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from envirophat import motion | |
from ISStreamer.Streamer import Streamer | |
import time | |
# --------- User Settings --------- | |
# Initial State settings | |
BUCKET_NAME = "Envir:cloud: pHAT Motion" | |
BUCKET_KEY = "ephm0720" | |
ACCESS_KEY = "PUT YOUR INITIAL STATE ACCESS_KEY HERE" | |
# Set the time between sensor reads |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import division | |
from subprocess import PIPE, Popen | |
from envirophat import weather | |
from ISStreamer.Streamer import Streamer | |
import time | |
# --------- User Settings --------- | |
# Initial State settings | |
BUCKET_NAME = "Envir:cloud: pHAT Temperatures" | |
BUCKET_KEY = "eph0720" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sense_hat import SenseHat | |
sense = SenseHat() | |
while True: | |
orientation = sense.get_orientation() | |
print "pitch = " + str(orientation['pitch']) | |
print "roll = " + str(orientation['roll']) | |
print "yaw = " + str(orientation['yaw']) |
NewerOlder