Skip to content

Instantly share code, notes, and snippets.

View midi_leds.ino
#include <MIDI.h>
#define NOTES 26
#define OCTAVE_LENGTH 12
#define BASELINE 43
#define CHANNELS 3
int latchPin1 = 8;
int clockPin1 = 12;
int dataPin1 = 11;
@sivieri
sivieri / config
Created Jun 1, 2013
crosstool-ng configuration file for Kindle 4 NT
View config
#
# Automatically generated make config: don't edit
# crosstool-NG 1.18.0 Configuration
# Fri May 31 16:14:55 2013
#
CT_CONFIGURE_has_xz=y
CT_CONFIGURE_has_svn=y
CT_MODULES=y
#
@sivieri
sivieri / mnemonics.erl
Created Sep 6, 2012
Phone mnemonics in Erlang
View mnemonics.erl
-module(mnemonics).
-export([translate/1]).
-define(MNEMONICS, [{2, "ABC"}, {3, "DEF"}, {4, "GHI"}, {5, "JKL"}, {6, "MNO"}, {7, "PQRS"}, {8, "TUV"}, {9, "WXYZ"}]).
-define(WORDS, []).
% Public API
translate(StringNumber) ->
Result2 = encode(StringNumber, fun(X) -> sets:to_list(sets:from_list(slab(X))) end),
Result = sets:from_list(Result2),
@sivieri
sivieri / SDWebBrowse.pde
Created Nov 30, 2011
Arduino Web Server
View SDWebBrowse.pde
#include <SdFat.h>
#include <SdFatUtil.h>
#include <SPI.h>
#include <Ethernet.h>
//#include <EthernetDHCP.h>
#include <LiquidCrystal.h>
#include <string.h>
#define BUFSIZ 100
@sivieri
sivieri / midiTheremin.cpp
Created Aug 31, 2011
Code for reading from two IR proximity sensors with Arduino and outputting their values as MIDI CC
View midiTheremin.cpp
/*
Copyright (c) 2011 Alessandro Sivieri <alessandro.sivieri@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License version 3 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@sivieri
sivieri / FrameDifferencingDump.java
Created Aug 19, 2011
Processing.org and GSVideo: capture, frame difference and dump
View FrameDifferencingDump.java
import codeanticode.gsvideo.*;
int numPixels;
int[] previousFrame;
GSCapture video;
GSMovieMaker mm;
int fps = 15;
void setup() {
size(640, 480);