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
{ | |
HighestSeverity: 'SUCCESS', | |
Notifications: [ | |
{ | |
Severity: 'SUCCESS', | |
Source: 'locs', | |
Code: '000', | |
Message: 'SUCCESS', | |
LocalizedMessage: 'SUCCESS' | |
} |
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
STARTUP(WiFi.selectAntenna(ANT_EXTERNAL)); | |
// we will handle wifi manually | |
SYSTEM_MODE(SEMI_AUTOMATIC); | |
void setup() { | |
Serial.begin(9600); // open serial over USB | |
delay(3000); |
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
void setup() { | |
// put your setup code here, to run once: | |
byte ON[]={0xA5,0x05,0x4C,0x4C,0x42}; | |
KIRSP_cal_CRC16(ON, 5); | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
} |
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 http = require('http'); | |
var url = require('url'); | |
var host = '127.0.0.1'; | |
var port = 8080; | |
var zones = ["P9_11","P9_13","P9_15","P9_17","P9_21","P9_23","P9_25","P9_27","P9_28","P9_26","P9_24","P9_22","P9_18","P9_16","P9_14","P9_12"]; | |
var rain = 'P9_29'; | |
var button = 'P9_30'; |
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 b = require('bonescript'); | |
var state = b.LOW; | |
b.pinMode("P9_15", b.OUTPUT, 7, 'pulldown', 'fast'); | |
b.pinMode("P9_17", b.OUTPUT, 7, 'pulldown', 'fast'); | |
setInterval(toggle, 1000); | |
function toggle() { | |
if(state == b.LOW) state = b.HIGH; |
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 b = require('bonescript'); | |
var state = b.LOW; | |
b.pinMode("P9_15", b.OUTPUT); | |
b.pinMode("P9_17", b.OUTPUT); | |
setInterval(toggle, 1000); | |
function toggle() { | |
if(state == b.LOW) state = b.HIGH; |
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 parseStreamUrl(url,i) { | |
// some entries are actually just direct stream urls | |
if (url.indexOf(".asx") !== -1 || url.indexOf(".pls") !== -1) { | |
request.get(url,function (error, response, body) { | |
if (!error && response.statusCode == 200) { | |
// asx hides stuff in XML | |
if(url.indexOf(".asx") !== -1){ | |
var stream = $(body).find("entry:first").find("ref").attr("href"); | |
} | |
// everything else should be able to be regex'd out |
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
//****************************** | |
// BUILD THE HTTP SERVER | |
//****************************** | |
var express = require('express'); | |
var app = express.createServer(); | |
app.get('/login', function(req, res){ | |
console.log("hit the login"); | |
res.send('you hit the login'); | |
}); |