Skip to content

Instantly share code, notes, and snippets.

//Code created by Angela Perrone
//Arduino Example Sketches used for reference (simple, striptest, buttoncycler)
//Book - Resistor Ladder
//Tom Igoe Switch State Code
//Gustavo E de Campos Abbott
const int pin1 = A0;
int lastRotary = 0;
//int currentRotary = 13;
//http://playground.arduino.cc/Main/KeypadTutorial
//http://playground.arduino.cc/Main/MultiUserKeypadPassword
//http://forum.arduino.cc/index.php?topic=43803.0
#include <Key.h>
#include <Keypad.h>
int i = 0;
int state = 1; //create state
/*
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
//Code created by Angela Perrone
//Arduino Example Sketches used for reference (simple, striptest, buttoncycler)
//Book - Resistor Ladder
//Tom Igoe Switch State Code
//neopixel ring code https://learn.adafruit.com/adafruit-neopixel-uberguide/downloads
// NeoPixel Ring simple sketch (c) 2013 Shae Erisson
// released under the GPLv3 license to match the rest of the AdaFruit NeoPixel library
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
//Code created by Angela Perrone
//Arduino Example Sketches used for reference
const int pin10 = 2;
const int pin9 = 3;
const int pin8 = 4;
const int pin7 = 5;
const int pin6 = 6;
const int pin5 = 7;
//References
//Basic Example, Arduino IDE
//https://cdn-shop.adafruit.com/datasheets/DRV2605.pdf
//Tom Igoe switch state example
#include <Adafruit_DRV2605.h>
#include <Wire.h>
const int onOff = 5;
const int pausePlay = 6;
const int skipForward = 9;
/*
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
const int pin10 = 2;
const int pin9 = 3;
const int pin8 = 4;
const int pin7 = 5;
const int pin6 = 6;
const int pin5 = 7;
const int pin4 = 8;
const int pin3 = 9;
const int pin2 = 10;
const int pin1 = 11;
//https://learn.adafruit.com/adafruit-neopixel-uberguide/arduino-library
//https://github.com/MakerDen/Maker-Den-NETMF/wiki/NeoPixel-Jewel-Setup
//Tom Igoe, in class examples
//http://cdn.sparkfun.com/datasheets/Components/Switches/SC608N-b10k.pdf
//https://github.com/tigoe/NeoPixel_examples/blob/master/NeoPixelFadeAll/NeoPixelFadeAll.ino
//reference: https://itp.nyu.edu/physcomp/labs/motors-and-transistors/using-a-transistor-to-control-high-current-loads-with-an-arduino/
//reference: http://www.tautvidas.com/blog/2012/08/distance-sensing-with-ultrasonic-sensor-and-arduino/
//reference: https://www.arduino.cc/en/Tutorial/Ping
//reference: http://art-research2010summer.blogspot.com.es/2010/06/tutorial-01-isadora-and-arduino.html
const int trigPin = 12;
const int echoPin = 13;
void setup() {