🧙♂️
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
/**************************************** | |
Classroom Noise-o-Meter | |
Modified code from the Example Sound Level Sketch for the | |
Adafruit Microphone Amplifier | |
****************************************/ | |
const int sampleWindow = 50; // Sample window width in mS (50 mS = 20Hz) | |
unsigned int sample; | |
int greenLED = 13; // choose your LEDs. helpful to descriptively label them | |
int yellowLED = 12; |
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
/* | |
* RGB Mixer code by Jonathan Prozzi. | |
* This includes Simon Monk's RGB LED code from the Adafruit lesson. | |
* | |
* There are several variables that need to be initialized. | |
* Remember, if you change the pins on the Arduino you | |
* also change the variables below. | |
*/ | |
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 ledPin=9; //Variable to store pin of LED | |
int potentPin=A0; //Variable to store pin of potentiometer | |
int potentValue=0; //Variable to store last known value of potentiometer | |
int brightnessValue=0; //Variable to store LED brightness | |
void setup() { | |
// put your setup code here, to run once: | |
pinMode(ledPin, OUTPUT); //Setup LED pin for output | |
} |
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
/* | |
This sketch is from the Adafruit Arduino series by Simon Monk. | |
Additional comments added by Jonathan Prozzi. | |
Adafruit Arduino - Lesson 13. DC Motor | |
*/ | |
int motorPin = 3; // set the pin that controls the motor. this is the one that attachs to the resistor | |
void setup() | |
{ |
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
const int sampleWindow = 50; // Sample window width in mS (50 mS = 20Hz) | |
unsigned int sample; | |
int greenLED = 13; | |
int yellowLED = 12; | |
int redLED = 11; | |
void setup() | |
{ | |
pinMode(greenLED, OUTPUT); | |
pinMode(yellowLED, OUTPUT); | |
pinMode(redLED, OUTPUT); |
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 ledPin=9; //Variable to store pin of LED | |
int potentPin=A0; //Variable to store pin of photoresistor | |
int potentValue=0; //Variable to store last known value of photoresistor | |
int brightnessValue=0; //Variable to store LED brightness | |
void setup() { | |
// put your setup code here, to run once: | |
pinMode(ledPin, OUTPUT); //Setup LED pin for output | |
} | |
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
// 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> // this is a library that you need to include | |
#ifdef __AVR__ | |
#include <avr/power.h> | |
#endif | |
// Which pin on the Arduino is connected to the NeoPixels? | |
// On a Trinket or Gemma we suggest changing this to 1 |
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
/* Arduino Experimenter Challenge: Broken Traffic Light | |
* This traffic light is -sooo close- to being correct, but something seems | |
* off with the logic... | |
* | |
* Can you fix it? | |
* | |
* Hint: Think about how a functioning traffic light works and build out the logic- | |
* what steps should the lights go in? | |
* should two colors ever be on at the same time? | |
* |
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
/* | |
This sketch is modified from the 'Sweep' example sketch by BARRAGAN | |
and the modification by Scott Fitzgerald | |
*/ | |
#include <Servo.h> //This is necessary when working with servos. It includes the servo library. | |
Servo myservo; // create servo object to control a servo | |
// twelve servo objects can be created on most boards |