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
// A fun sketch to demonstrate the use of the Tone library. | |
// To mix the output of the signals to output to a small speaker (i.e. 8 Ohms or higher), | |
// simply use 1K Ohm resistors from each output pin and tie them together at the speaker. | |
// Don't forget to connect the other side of the speaker to ground! | |
// You can get more RTTTL (RingTone Text Transfer Language) songs from | |
// http://code.google.com/p/rogue-code/wiki/ToneLibraryDocumentation | |
/************************************************* |
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
// Settings | |
#define PLAYER_NUM 1 | |
#define PIN_SQUELCH 5 | |
// Constants | |
#define USB_PKT_SIZE 8 | |
#define USB_KEY_START 2 | |
#if PLAYER_NUM == 1 | |
#define PIN_COUNT 15 |
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
#include <stdlib.h> | |
/* | |
Returns a pointer to the first occurrence of character in the C string str. | |
The terminating null-character is considered part of the C string. Therefore, | |
it can also be located to retrieve a pointer to the end of a string. | |
@param str the string to be searched | |
@param len the number of characters to search | |
@param character the character to search for |
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
#!/bin/sh | |
# modified by jfro from http://www.cnysupport.com/index.php/linode-dynamic-dns-ddns-update-script | |
# Uses curl to be compatible with machines that don't have wget by default | |
LINODE_API_KEY=licensekey | |
DOMAIN_ID=domainid | |
RESOURCE_ID=resourceid | |
WAN_IP=`curl -s http://example.com/whatsmyip.php` | |
if [ -f $HOME/.wan_ip.txt ]; then |
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
//We always have to include the library | |
#include "LedControl.h" | |
LedControl lc=LedControl(10,11,12,1); | |
unsigned long delaytime=100; | |
void setup() { | |
Serial.begin(9600); |
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
// This file has moved into the glassfridge project. | |
// Find it here: https://github.com/smarthall/glassfridge | |
#include <SoftwareSerial.h> | |
// software serial #1: TX = digital pin 2, RX = digital pin 3 | |
SoftwareSerial xbee(2, 3); | |
unsigned long nextreport; | |
#define REPORTINT 10000UL |
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
#!/bin/bash | |
# To use: | |
# Plug the left display into pin 24 on connector P9 | |
# Plug the right display into pin 21 on connector P9 | |
if [ -f /sys/devices/bone_capemgr*/slots ]; then | |
# Create and setup the UART devices if needed | |
if [ -f /dev/ttyO1 ]; then | |
echo BB-UART1 >/sys/devices/bone_capemgr*/slots |
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
function pve { | |
VENVFILE="$HOME/usr/venv/$1/bin/activate" | |
if [ -f $VENVFILE ]; then | |
source $VENVFILE | |
else | |
virtualenv $HOME/usr/venv/$1 | |
source $VENVFILE | |
fi | |
} |
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
http://filamentgroup.com/lab/responsive_design_approach_for_complex_multicolumn_data_tables/ |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
OlderNewer