Skip to content

Instantly share code, notes, and snippets.

View mdobson's full-sized avatar
😺
Petting a cat

Matthew Dobson mdobson

😺
Petting a cat
View GitHub Profile
  • title: Zetta: An API-First Internet of Things Platform
  • name: Matthew Dobson
  • bio: Matt is an engineer at Apigee. He's based in Detroit Michigan, and focuses on the Internet of Things.
  • abstract: Creating stable cross platform access layers for interacting with devices will be how companies will how companies win on the IoT front. This talk will describe different issues within the Internet of Things, and how they should be solved in an open way. It'll also include a demo of Zetta. A new open source framework for creating platforms for the Internet of Things that is API first.
@mdobson
mdobson / 1.md
Created October 30, 2014 14:34
Setting Up Edison Wifi
@mdobson
mdobson / 1.sh
Created October 20, 2014 02:55
spark core script
$ spark keys new
$ spark keys save $CORE_ID
$ spark keys server default_key.pub.pem $IP
@mdobson
mdobson / app.js
Last active August 29, 2015 14:07 — forked from 13protons/app.js
module.exports = function(server) {
var buttonQuery = server.where({type: 'button'});
server.observe([buttonQuery], function(button){
button.on('click', function(b){
//This will log undefined because there are no inputs to this transition
//You can use dot notation to access properties on devices
//console.log(b);
console.log(button.b);
@mdobson
mdobson / 1.js
Last active August 29, 2015 14:07
//somewhere else in your class
function Voice() {
this.voice = {
Agnes: {
locale: 'en_US',
example: 'Isn\'t it nice to have a computer that will talk to you?'
}
Voice.prototype.say = function(words, voice, rate) {
var marshalledVoice;
if(typeof voice === 'string') {
marshalledVoice = JSON.parse(voice);
}else {
marshalledVoice = voice;
}
//Do your logic.
}
@mdobson
mdobson / 1.js
Created October 8, 2014 20:01
Robot arm scout
var util = require('util');
var Scout = require('zetta').Scout;
var RobotServer = require('./robot_server');
var RobotArm = require('./robot_arm');
//Inherit scouty goodness
var RobotArmScout = module.exports = function(){
Scout.call(this);
//This is the server we use to communicate with the robot arm
this.updServer = new RobotServer();
@mdobson
mdobson / index.js
Last active November 24, 2015 16:59
Scouting in Zetta.
var sonos = require('sonos');
var Scout = require('zetta-scout');
var util = require('util');
var SonosDriver = require('./sonos_driver');
//We inherit from scout to get some Zetta functionality
var SonosScout = module.exports = function() {
Scout.call(this);
};
util.inherits(SonosScout, Scout);
@mdobson
mdobson / 1.json
Last active August 29, 2015 14:07
{
"class": [
"device"
],
"properties": {
"bulbId": "2",
"bulbName": "Zetta Demo",
"id": "53ff47ba-0364-4b11-abc0-58bec65f1cf3",
"type": "huebulb",
"name": "Hue Bulb Zetta Demo",
@mdobson
mdobson / 1.sh
Created September 30, 2014 20:50
.
├── app.js
├── index.js
├── led_driver.js
├── package.json
├── server.js
└── sound_driver.js
0 directories, 6 files