Tag Archives: arduino
Fun with Tone Output
Arduino Code:
/*
Theremin
Plays tones based on a sensor reading
uses Tone library by Brett Hagman
http://code.google.com/p/arduino-tone/
circuit:
* photoresistor from +5V to analog in 0
* photoresistor from analog pin 0 to ground
* 8-ohm speaker on digital pin 8
created 10 Sep 2009
by Tom Igoe
*/
#include
Tone noiseMaker; [...]
Plant Watering Alert System
The alert system functions by illuminating the green LED while the plant is properly watered and switches the red LED on when the plant is in need of watering (or dry). Also, when the soil is dry and the plant is watered, the system will turn the red LED off and the green LED on.
A [...]
Physical Computing – Week 2 Lab
This week we studied analog inputs. In lab, I created a circuit using the Arduino to translate analog reads from a potentiometer (switch) into the brightness of an LED.
int potPin = 0; // Analog input pin that the potentiometer is attached to
int potValue = 0; // Value read from the pot
int led = 9; // [...]
Graphing Analog Sensors