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
{ | |
"metadata": { | |
"name": "" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
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
// Using Plot.ly's Arduino API to visualize Temperature and Humidity Readings from A DHT22 Sensor | |
#include <SPI.h> | |
#include <Ethernet.h> | |
#include "plotly_ethernet.h" | |
#include "DHT.h" | |
// DHT Sensor Setup | |
#define DHTPIN 2 // We have connected the DHT to Digital Pin 2 |
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
var wlan = require("CC3000").connect(); | |
var http = require("http"); | |
var options = { | |
hostname: 'https://plot.ly/clientresp/', | |
port: 80, | |
method: 'POST' | |
}; | |
wlan.connect( "sw", "nomodernjesus", function (s) { |
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
var five = require("johnny-five"), | |
board, photoresistor; | |
var Stream = require('stream'); | |
var sensorstream = new Stream(); | |
board = new five.Board(); | |
var plotly = require('plotly')('demos','tj6mr52zgp'); |
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
var five = require("johnny-five"); | |
var board = new five.Board(); | |
var Stream = require('stream'); | |
var tmp36_stream = new Stream(); | |
var plotly = require('plotly')('demos','tj6mr52zgp'); |
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
#include <Adafruit_CC3000.h> | |
#include <ccspi.h> | |
#include <SPI.h> | |
#include <string.h> | |
#include <plotly_streaming_cc3000.h> | |
#define WLAN_SSID "evilfriends" | |
#define WLAN_PASS "nomodernjesus" | |
#define WLAN_SECURITY WLAN_SEC_WPA2 |
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
var plotly = require('plotly')('workshop','v6w5xlbx9j'); | |
var five = require("johnny-five"); | |
var board = new five.Board(); | |
// plotly init data | |
var data = [ | |
{x:[], y:[], stream:{token:'25tm9197rz', maxpoints:200}}, | |
{x:[], y:[], stream:{token:'unbi52ww8a', maxpoints:200}} | |
]; |
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
var plotly = require('plotly')('streaming-demos','3yyglqsi85'); | |
var five = require("johnny-five"); | |
var board = new five.Board(); | |
var EventEmitter = require('events').EventEmitter; | |
// plotly init data | |
var data = [ | |
{x:[], y:[], stream:{token:'8xdfnkq1nb', maxpoints:210}, name: 'Device 1'}, | |
{x:[], y:[], stream:{token:'xtndiqvpol', maxpoints:200}, name : 'Device 2'}]; |
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
var plotly = require('plotly')('streaming-demos','3yyglqsi85'); | |
var five = require("johnny-five"); | |
var board = new five.Board(); | |
var EventEmitter = require('events').EventEmitter; | |
// lets do this | |
board.on("ready", function () { | |
var photoresistor = new five.Sensor({ pin: "A0", freq: 50, threshold: 100 }); | |
var potentiometer = new five.Sensor({ pin: "A5", freq: 50, threshold: 100 }); |
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
var emitStream = require('emit-stream'); | |
var websocket = require('websocket-stream'); | |
var WebSocketServer = require('ws').Server; | |
var JSONStream = require('JSONStream'); | |
var EventEmitter = require('events').EventEmitter; | |
var server = (function () { | |
var self = new WebSocketServer({port: 8080}); | |
return self; | |
})(); |
OlderNewer