This file contains 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
Delivered-To: matt@insertlearning.com | |
Received: by 10.28.145.146 with SMTP id t140csp1188325wmd; | |
Tue, 13 Mar 2018 14:46:30 -0700 (PDT) | |
X-Google-Smtp-Source: AG47ELuvIDJ+zE0q454oH1RWwzo/uatiT9M1vCP3/tCflwMrhMG0KUdW0Eqaa1VUcnpKqxjzLcd7 | |
X-Received: by 2002:a17:902:12e:: with SMTP id 43-v6mr1830694plb.77.1520977590543; | |
Tue, 13 Mar 2018 14:46:30 -0700 (PDT) | |
ARC-Seal: i=1; a=rsa-sha256; t=1520977590; cv=none; | |
d=google.com; s=arc-20160816; | |
b=Z2yhhd6pLxEBoWxU/HmWXLOrpA3flXlONneAa2hB/PkZ7xFWFWzjMpy6d/3vGXxK59 | |
M6Wwcgf1k2mhO22Mex2Vtqjr5hRrNCFlL+D3YfVN1mmpXMWjheKpurKsiFEyBANEFMNy |
This file contains 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> | |
#define PIN 6 | |
Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, PIN, NEO_GRB + NEO_KHZ800); | |
#include "mpr121.h" | |
#include <Wire.h> | |
int irqpin = 2; // Digital 2 |
This file contains 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
// Low power NeoPixel earrings example. Makes a nice blinky display | |
// with just a few LEDs on at any time...uses MUCH less juice than | |
// rainbow display! | |
#include <Adafruit_NeoPixel.h> | |
#define PIN 0 | |
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(32, PIN); |
This file contains 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
/* | |
plays melody and fades led based on analog input | |
changes from sketch 3: | |
* had to change led and speaker pins due to PWM timing issues | |
http://arduino.cc/en/Reference/Tone | |
* moved sensor and LED code into the for loop so that it is updated as the song runs. makes program more responsive. | |
circuit: | |
* piezo speaker on D9 | |
* potentiometer with center wire to A0 |
This file contains 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
int sensorVal = 0; | |
int sensorPin = A0; | |
int ledPin = 11; | |
void setup() { | |
// put your setup code here, to run once: | |
pinMode(ledPin,OUTPUT); | |
pinMode(sensorPin,INPUT); | |
Serial.begin(9600); | |
} |