Skip to content

Instantly share code, notes, and snippets.

View tekket's full-sized avatar

Tekket tekket

View GitHub Profile
@tekket
tekket / ledbuttonstate.ino
Last active August 29, 2015 14:04
Arduino Button State testing - Break loop for LED effect mode changes
long oldtime = 0;
long waittime = = 1000000; //
long time;
long minute = 60000; // 60000 milliseconds in a minute
time = millis(); //Clock time when pressed initially
if (time - oldtime > waittime) {
@tekket
tekket / Fire2012MatrixSimple.ino
Last active August 29, 2015 14:04
Fire2012MatrixSimple FastLED
#define NUM_ROWS 8
#define NUM_LEDS_PER_ROW 100
// Param for different pixel layouts
const bool kMatrixSerpentineLayout = true;
void Fire2012()
{
// Array of temperature readings at each simulation cell
static uint8_t heat[NUM_ROWS-1][NUM_LEDS_PER_ROW];
@tekket
tekket / StickmanLED.ino
Last active December 20, 2015 06:49
Code for stickman led suit
#include "LPD8806.h"
#include "SPI.h"
/*****************************************************************************/
// Full 5m LPD8806 STRIP
/*****************************************************************************/
#define holdTime 3000 //used to time button hold for special function
#define buttonPin 23 //Default button pin, Pin 21 and 22 used for SPI
const int usb_usb_disable = 0; // disabled usb is enable to save power
int mode = 0; // default mode is off (0)
int nummodes = 12; // number of total modes
@tekket
tekket / LEDBeltKit-neweffecttesting.ino
Created July 26, 2013 04:19
ledbeltkit default library, modified for testing additional effects.
#include "LPD8806.h"
#include "SPI.h"
// Example to control LPD8806-based RGB LED Modules in a strip!
/*****************************************************************************/
int NUM_LEDS =32;
int BOTTOM_INDEX = 0;
int TOP_INDEX = int(NUM_LEDS/2);
int EVENODD = NUM_LEDS%2;
@tekket
tekket / LEDBattlebeerpong.ino
Last active December 20, 2015 06:29
code for LED Battle Beer Pong table. LPD8806 strips, 2 buttons to enable strobe mode.
#include "LPD8806.h"
#include "SPI.h"
/*****************************************************************************/
// Full 5m LPD8806 STRIP BP Table
/*****************************************************************************/
#define holdTime 16000 //used to time button hold for special function
#define buttonPin 7 //USED TO CHANGE TABLE EFFECT has false hit issues
#define Player1 9 // button for player 1
#define Player2 8 // button for player 2
@tekket
tekket / bluebombers.pde
Created September 8, 2012 04:57
LPD8806 5M Strip Code for Football team colors
#include "LPD8806.h"
#include "SPI.h"
/*****************************************************************************/
// Full 5m LPD8806 STRIP
/*****************************************************************************/
#define holdTime 3000 //used to time button hold for special function
#define buttonPin 23 //Default button pin
//Pin 21 and 22 used for SPI
@tekket
tekket / bombers_basic_shorts.pde
Created September 3, 2012 02:09
LPD8806 5M Strip Code for Football team colors
#include "LPD8806.h"
#include "SPI.h"
// Full 5m Blue Bomber
/*****************************************************************************/
// Number of RGB LEDs in strand:
int nLEDs = 160;
// Set the first variable to the NUMBER of pixels. 32 = 32 pixels in a row