Skip to content

Instantly share code, notes, and snippets.

@Threeethan
Threeethan / gist:9419326
Created March 7, 2014 20:26
Modified SerialSelector.pde
public class SerialSelector {
public boolean m_chosen;
public String m_port;
PFont m_font;
int m_fontSize = 15;
float m_fontHeight;
float m_fontAscent;
//color m_bgcolor = color(80,120,230,150);
@Threeethan
Threeethan / gist:8772775
Created February 2, 2014 18:37
BlinkyTape Interrupt Example
#include <FastSPI_LED2.h>
#define DEBUG
#define LED_COUNT 60 // BlinkyTape has 60 LEDs!
struct CRGB leds[LED_COUNT]; // this struct contains 60 CRGB values. This is where
#define LED_MAX_BRIGHTNESS 55
#define PIN_BUTTON 10
@Threeethan
Threeethan / free_sram
Created January 6, 2014 17:28
Quick and dirty estimate of free ram on Arduino
int freeRam () {
extern int __heap_start, *__brkval;
int v;
return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
}
Serial.print("Free Ram = "); Serial.println (freeRam());
@Threeethan
Threeethan / gist:7938597
Created December 13, 2013 01:29
Simple BlinkyTape sketch for slowly moving red-green-white lights - nice for Christmas trees! Upload using Arduino.
// This is the example sketch that gets loaded on every BlinkyTape during production!
#include <FastSPI_LED2.h>
#include <Animation.h>
#define LED_COUNT 60
struct CRGB leds[LED_COUNT];
#ifdef REVB // RevB boards have a slightly different pinout.