This file contains hidden or 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 <Adafruit_NeoPixel.h> | |
const int neoPixelPin = 1; //control pin | |
const int numPixels = 12; // number of pixels | |
int sensorOne = 0; | |
int blue = 255; | |
//set up strip |
This file contains hidden or 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
/* | |
Music player | |
Plays a directory of music | |
Plays songs in a subdirectory of the sketch called music | |
Put any songs you want in the music subdirectory, then | |
copy the list of song names into the songs[] array. | |
created by Tom Igoe |
This file contains hidden or 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 <Keyboard.h> | |
int buttonStateOne = 0; | |
int lastButtonStateOne = 0; | |
int buttonStateTwo = 0; | |
int lastButtonStateTwo = 0; | |
int buttonStateThree = 0; | |
int lastButtonStateThree = 0; | |
int buttonStateFour = 0; | |
int lastButtonStateFour = 0; |
This file contains hidden or 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
// Tom Igoe's code | |
// Music Player | |
// Plays song in a subdirectory of the sketch called music | |
// Put any songs you want in the subdirectory, then copy | |
// the list of song names into the songs[] array. | |
var song; //the sound file to be played |
This file contains hidden or 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
//Code courtesy of www.interactivemateriality.com | |
#define RUBBERPIN A0 | |
// how many samples to take and average, more takes longer | |
// but is more 'smooth' | |
#define NUMSAMPLES 5 | |
// the value of the 'other' resistor | |
#define SERIESRESISTOR 10000 | |
int samples[NUMSAMPLES]; |
This file contains hidden or 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 <Adafruit_NeoPixel.h> | |
const int neoPixelPin = 6; //control pin | |
const int numPixels = 12; // number of pixels | |
int sensorOne = 0; | |
int blue = 255; | |
int sensorTwo = 0; | |
int red = 255; | |
int sensorThree = 0; |