Skip to content

Instantly share code, notes, and snippets.

View Cribstone's full-sized avatar

Andrew Jawitz Cribstone

View GitHub Profile
@Cribstone
Cribstone / configuration.yaml
Created November 18, 2015 21:35
Configuration.yaml - Home Assistant.io
homeassistant:
# Name of the location where Home Assistant is running
name: GooseCreek
# Location required to calculate the time the sun rises and sets
latitude: [REDACTED]
longitude: [REDACTED]
# C for Celcius, F for Fahrenheit
temperature_unit: F
# Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
time_zone: America/New_York
/**
Filename: commands.js
AppLamp.nl led light API: wifi box byte commands
© AppLamp.nl: you can share,modify and use this code (commercially) as long as you
keep the referer "AppLamp.nl led light API" in the file header.
RESPECT AT LEAST 50 MS BETWEEN EACH SEND COMMAND TO PREVENT PACKAGE LOSS
The functions in this file will return the appropriate hex commands as 3 byte array
to send to an UDP-socket towards WIFI BOX-IP:8899 (see wifibox.js)
/**
Filename: wifibox.js
//AppLamp.nl Wifi LED light API: wifi box UDP socket, command sender
© AppLamp.nl: you can share,modify and use this code (commercially) as long as you
keep the referer "AppLamp.nl led light API" in the file header.
Usage in Node JS:
//load this wifi box class
var WifiBoxModule = require('wifibox.js');
// See http://bildr.org/2011/02/mlx90614-arduino/ for i2c library and instructions
// You must download the "twimaster.cpp" and "i2cmaster.h" files, and place them in a folder called "I2Cmaster". This must be placed in a folder called "libraries" which in turn should be placed in your Sketchbook folder (see Arduino's Preferences menu item to see where this is on your machine.).
// Typically, once you install these files, you must relaunch Arduino.
// The extra files are included in this Gist, as well as attached to the page http://publiclaboratory.org/tool/thermal-camera
#include <i2cmaster.h>
#include "Wire.h"
//#include "BlinkM_funcs.h"

Armory on the RPi

Building the Armory Bitcoin client for the Raspberry Pi

This is how I got Armory (etotheipi/BitcoinArmory; http://bitcoinarmory.com/) cross-compiled for the Raspberry Pi.

This is a great way to keep an air-gapped offline wallet for only $30 dollars for the RPi (that you can also use for other things; experiment, it's awesome) and $7 for a Class 10 4GB SD card, really easy to keep in a safe and secret place.

Dependencies

Bitcoin Payment Messages

This document proposes protocol buffer-based formats for a simple payment protocol between a customer's bitcoin client software and a merchant.

Separate documents will propose an extension to the Bitcoin URI syntax and new MIME types to support them.

Motivation

/*******************************************************
* SerialServoControl Sketch
* Written by Ryan Owens for SparkFun Electronics
* 7/15/11
*
* This sketch listens to serial commands and uses the data
* to set the position of two servos.
*
* Serial Command Structure: 2 bytes - [ID Byte][Servo Position byte]
* ID byte should be 0 or 1.
// This code uses the SoftwareSerial library.
// It can be obtained here: http://arduino.cc/en/Reference/SoftwareSerial
unsigned int timeout=0;
unsigned char state=0;
char val; // variable to receive data from the serial port
int ledpin = 13; // LED connected to pin 13
// Timer2 service
import pyfirmata
print "maker1"
# Create a new board, specifying serial port
board = pyfirmata.Arduino('/dev/ttyACM0')
print "maker2"
# start an iterator thread so that serial buffer doesn't overflow
/*******************************************************
* SerialServoControl Sketch
* Written by Ryan Owens for SparkFun Electronics
* 7/15/11
*
* This sketch listens to serial commands and uses the data
* to set the position of two servos.
*
* Serial Command Structure: 2 bytes - [ID Byte][Servo Position byte]
* ID byte should be 0 or 1.