Skip to content

Instantly share code, notes, and snippets.

View mrichardson23's full-sized avatar

Matt Richardson mrichardson23

View GitHub Profile
[ 0.000000] Booting Linux on physical CPU 0xf00
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.0.8-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03) ) #805 SMP PREEMPT Thu Jul 16 18:46:20 BST 2015
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine model: Raspberry Pi 2 Model B Rev 1.1
[ 0.000000] cma: Reserved 8 MiB at 0x3a800000
[ 0.000000] Memory policy: Data cache writealloc
@mrichardson23
mrichardson23 / gist:1740436
Created February 4, 2012 21:52
Kinect Foam Hand Tracking 2
import SimpleOpenNI.*;
SimpleOpenNI kinect;
float youAre = 0;
PImage handImage;
int imageHeight = 1787;
int imageWidth = 833;
void setup() {
kinect = new SimpleOpenNI(this);
@mrichardson23
mrichardson23 / Faux3D.pde
Created February 10, 2012 18:07
FaceOSC and Processing for Faux 3D Effects
import oscP5.*; OscP5 oscP5;
float posePositionX;
float posePositionY;
float poseScale;
PImage interior;
PImage exterior;
void setup() {
size(1000,667);
@mrichardson23
mrichardson23 / lamp.php
Created August 9, 2012 12:16
Internet Connected Lamp via iDigi
<?
$idigi_username = 'YOUR_IDIGI_USERNAME'; // enter your username here.
$idigi_password = 'YOUR_IDIGI_PASSWORD'; // enter your password here. Consider your options for securing this info.
$device_id = '00000000-00000000-XXXXXXX-XXXXXXXX'; // XIG device ID (replace the X's with the device ID from your XIG setup screen)
$hardware_address = '00:13:a2:00:XX:XX:XX:XX'; // XBee's Hardware address (replace the X's so that this value matches your hardware address)
$idigi_sci_url = 'http://developer.idigi.com/ws/sci'; // Keep this as is.
// Only take action if a valid set parameter comes through (i.e. http://www.example.com/lamp.php?set=on)
@mrichardson23
mrichardson23 / checker.ino
Created August 23, 2012 12:11
XIG URL Checker
String check(String URL) {
String response = "";
Serial.println();
Serial.print("Connecting to ");
Serial.println(URL);
XBee.println(URL);
requestTime = millis();
while ((XBee.available() == 0) && (millis() - requestTime < responseTimeout))
{
//wait here until we hear something back or timeout
from bs4 import BeautifulSoup
import re
html_doc = """
<html>
<head>
<title>A Page About Cats</title>
</head>
<body>
#define LED_PIN 13
#define BUTTON_PIN 2
#define DIM_LED 11
void setup() {
pinMode(LED_PIN, OUTPUT);
pinMode(DIM_LED, OUTPUT);
pinMode(BUTTON_PIN, INPUT);
}
@mrichardson23
mrichardson23 / base.ino
Created June 13, 2013 17:30
Basic setup code for Arduino programming session
#define BUTTON_PIN 2
#define GREEN_LED 3
#define YELLOW_LED 4
#define RED_LED 5
#define POTENTIOMETER 0
void setup() {
pinMode(GREEN_LED, OUTPUT);
@mrichardson23
mrichardson23 / LEDFade-ForLoop.ino
Created June 14, 2013 17:45
Sample Code for Arduino Programming Basics Class
// Sample Code for Arduino Programming Basics Class
// Matt Richardson http://mattrichardson.com/
// With this code, make an LED fade up and down using a
// for loop!
// Wire up an LED to pin 3 (or any PWM pin, they're marked with a ~)
#define GREEN_LED 3
// Everything in the setup() function runs once when the Arduino starts up.
// Commands for Alpha Sign Communication Protocol
byte NUL = 0x00;
byte START_HEADER = 0x01;
byte START_TEXT = 0x02;
byte END_TRANSMISSION = 0x04;
byte ESC = 0x1B;
byte FILL = 0x30;
byte ROTATE = 0x61;
byte SLOW = 0x15;
byte FAST = 0x19;