November 24, 2007
Reading for November 27th, are now posted. Enjoy!
October 2, 2007
To upload your thoughtless acts, create a new assignment page like any other lab. You'll see "Thoughtless Acts" listed as one of the assignment options.
May 24, 2008
This site has been archived and is no longer editable. Stay tuned for the next version, coming in the fall!
- Control beat tempo and pitch with two potentiometers
- Use 3 LEDs to indicate different beat tempos
- Pause beat with FSR
[Components]
- Potentiometer X 2
- Piezo Speaker X 1
- LED X 3 (r, g, b)
- FSR X 1
- Resistor X 4
[Arduino Code]
int sensorPin = 0; // select the input pin for the sensor int fsrVal = 0; // variable to store the value coming from fsr int pot1Pin = 1; // select the input pin for the potentiometer 1 int pot2Pin = 2; // select the input pin for the potentiometer 2 int pot1Val = 0; // variable to store the value coming from pot 1 int pot2Val = 0; // variable to store the value coming from pot 2 int led1Pin = 9; // select the pin for the LED 1 int led2Pin = 10; // select the pin for the LED 2 int led3Pin = 11; // select the pin for the LED 3 int speakerPin = 7; // select the pin for speaker int beat = 200; // set the initial beat tempo int alt = 1; // alternate pitch for duotone