Skip to content

Instantly share code, notes, and snippets.

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 = {
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;
{
"latitude":42.3601,
"longitude":-71.0589,
"timezone":"America/New_York",
"currently":{
"time":1528402806,
"summary":"Mostly Cloudy",
"icon":"partly-cloudy-day",
"nearestStormDistance":2,
"nearestStormBearing":164,
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("'")])
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
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"
@jrbail01
jrbail01 / movement.py
Created June 14, 2017 15:18
Sense HAT Orientation Script
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'])