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
int incoming = 0; | |
int REDPin = 4; // RED pin | |
int GREENPin = 5; // GREEN pin | |
int BLUEPin = 6; // BLUE pin | |
void setup() { | |
// setup serial and led pins | |
Serial.begin(9600); | |
pinMode(REDPin, OUTPUT); | |
pinMode(GREENPin, OUTPUT); |
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
import imaplib, serial, struct, time | |
class Mail(): | |
def __init__(self): | |
self.user= 'USER' | |
self.password= 'PASS' | |
self.ser = serial.Serial('/dev/tty.usbmodem621', 9600) | |
self.M = imaplib.IMAP4_SSL('imap.gmail.com', '993') | |
self.M.login(self.user, self.password) | |
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
/* | |
G35: An Arduino library for GE Color Effects G-35 holiday lights. | |
Copyright © 2011 The G35 Authors. Use, modification, and distribution are | |
subject to the BSD license as described in the accompanying LICENSE file. | |
*/ | |
#include <G35String.h> | |
#define LIGHT_COUNT (25) | |
#define G35_PIN (13) |
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
/* | |
G35: An Arduino library for GE Color Effects G-35 holiday lights. | |
Copyright © 2011 The G35 Authors. Use, modification, and distribution are | |
subject to the BSD license as described in the accompanying LICENSE file. | |
*/ | |
#include <G35String.h> | |
#define LIGHT_COUNT (25) | |
#define G35_PIN (13) |
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
/* | |
G35: An Arduino library for GE Color Effects G-35 holiday lights. | |
Copyright © 2011 The G35 Authors. Use, modification, and distribution are | |
subject to the BSD license as described in the accompanying LICENSE file. | |
*/ | |
#include <G35String.h> | |
#define LIGHT_COUNT (25) | |
#define G35_PIN (13) |
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
int REDPin = 4; // RED pin | |
int GREENPin = 5; // GREEN pin | |
int BLUEPin = 6; // BLUE pin | |
void setup() { | |
pinMode(REDPin, OUTPUT); | |
pinMode(GREENPin, OUTPUT); | |
pinMode(BLUEPin, OUTPUT); | |
} |
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
/* | |
Blink | |
Turns on an LED on for one second, then off for one second, repeatedly. | |
This example code is in the public domain. | |
*/ | |
// Pin 13 has an LED connected on most Arduino boards. | |
// give it a name: | |
int led = 13; |
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
/* https://github.com/tropo/tropo-webapi-node */ | |
var tropowebapi = require('tropo-webapi'); | |
/* Express framwork http://expressjs.com */ | |
var express = require('express'); | |
/* http://mongoosejs.com/ */ | |
var mongoose = require('mongoose'); | |
mongoose.connect('mongodb://localhost/track'); | |
mongoose.connect(URI); | |
//connect to mongodb |
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
require 'rubygems' | |
require 'sinatra' | |
require 'haml' | |
require 'tropo-webapi-ruby' | |
require 'net/http' | |
set :public_folder, 'public' | |
tropoToken = "" | |
#phone numbers to send messages from | |
fromArray = ['9999999999','9999999999', '9999999999'] |
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
while (client.connected()) { | |
if (client.available()) { | |
if(finder.find("GET /")) { | |
while(finder.findUntil("led", "\n\r")) { | |
char type = client.read(); | |
int val = finder.getValue(); | |
lightStatus = changeLight(val); | |
} | |
} | |
//pass a simple http response to the browser |
OlderNewer