Skip to content

Instantly share code, notes, and snippets.

View geekscape's full-sized avatar

Andy Gelme geekscape

View GitHub Profile
var dgram = require('dgram'),
fs = require('fs'),
readline = require('readline');
var HOST = 'localhost';
var PORT = 4149;
//var client = dgram.createSocket('udp6');
var client = dgram.createSocket('udp4');
client.bind(0);
@geekscape
geekscape / udp_send.js
Created June 14, 2014 04:18
NodeJS UDP/IPv6 simple send message example
//var HOST = 'ip6-localhost';
var HOST = 'fdd5::1';
var REMOTE_PORT = 4000;
var LOCAL_PORT = 4001;
var dgram = require('dgram');
var message = new Buffer('(data)');
@geekscape
geekscape / udp_receive.js
Created June 14, 2014 04:15
NodeJS UDP/IPv6 simple server listen example
var PORT = 4000;
//var HOST = 'ip6-localhost';
var HOST = 'fdd5::1';
var dgram = require("dgram");
var server = dgram.createSocket("udp6");
server.on("error", function (err) {
@geekscape
geekscape / history_item.txt
Created April 10, 2014 01:53
Raspberry Pi /History: Build avr-gcc tool chain for ATMega256RFR2
Raspberry Pi
Sun Mar 16 19:44:44 EST 2014 [andyg]
Build avr-gcc tool chain for ATMega256RFR2
- See http://www.nongnu.org/avr-libc/user-manual/install_tools.html
- See http://permalink.gmane.org/gmane.comp.gcc.patches/283638
- See https://github.com/matthijskooijman/pinoccio-firmware
- See http://apt.stderr.nl/pool/main/g/gcc-avr/gcc-avr_4.8-2.pinoccio1.tar.gz
Contains avr-gcc "02_support_rfr2.patch" used below
export PREFIX=/usr/local/avr
@geekscape
geekscape / keybase.md
Created April 9, 2014 09:58
keybase.io proof

Keybase proof

I hereby claim:

  • I am geekscape on github.
  • I am geekscape (https://keybase.io/geekscape) on keybase.
  • I have a public key whose fingerprint is 73FB 7E29 1B0B FD52 B97E AA06 01A0 A26E 38F0 E0FF

To claim this, I am signing this object:

byte pinMap[] = {5, 6, 7, 8, 9, 10, 11, 12};
byte pinCount = sizeof(pinMap) / sizeof(byte);
int buttonPressTime = 250; // milliseconds
void setup(){
Serial.begin(115200);
for (byte index = 0; index < pinCount; index ++) {
pinMode(pinMap[index], OUTPUT);
@geekscape
geekscape / gist:127625
Created June 11, 2009 00:44
Aiko Device Handler prototype
/* AikoDeviceLightSensorHandler.pde
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Please do not remove the following notices.
* Copyright (c) 2009 by Geekscape Pty. Ltd.
* Documentation: http://github.com/geekscape/Aiko/tree/master/docs/FILL_ME_IN
* License: GPLv3. http://geekscape.org/static/arduino_license.html
* Version: 0.0
*
* Light Sensor Handler.
*