Skip to content

Instantly share code, notes, and snippets.

View jonathanhculver's full-sized avatar

Jon Culver jonathanhculver

View GitHub Profile
@jonathanhculver
jonathanhculver / blink.ino
Created December 26, 2012 05:37
Sample Blink from Arduino examples
@jonathanhculver
jonathanhculver / rgbBlink.ino
Created December 26, 2012 05:36
Simple blink for RGB LED
@jonathanhculver
jonathanhculver / lights.ino
Created December 26, 2012 03:54
Christmas lights flashing to trumpet part of All Of The Lights
/*
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)
@jonathanhculver
jonathanhculver / collision.ino
Last active December 10, 2015 01:18
Collision effect for hacked Christmas lights
/*
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)
@jonathanhculver
jonathanhculver / tail.ino
Last active December 10, 2015 01:18
Tail effect for hacked Christmas lights
/*
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)
@jonathanhculver
jonathanhculver / checkmail.py
Created December 14, 2012 02:02
Python script to check gmail for new email every minute and send to Arduino over serial.
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)
@jonathanhculver
jonathanhculver / checkmail.ino
Created December 14, 2012 01:56
Arduino code to display a different color LED based on what number it's given.
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);