Blinking LED Breadboard
Description
Use the Arduino to monitor your heart noise via LEDs and a Processing display.
Components Used
1 Red LED
1 Blue LED
2x 220 Ohm Resistor
10 kOhm Resistor
1 FSR
2x Potentiometer
1 Plush heart
Arduino Code
int fsrPin = 2;
int pot2Pin = 1;
int pot1Pin = 0;
int rPin = 5;
int bPin = 6;
int fsrByte;
int pot1Byte;
int pot2Byte;
void setup()
{
Serial.begin(9600);
// pinMode(rPin, OUTPUT);
// pinMode(gPin, OUTPUT);
// pinMode(bPin, OUTPUT);
}
void loop()
{
fsrByte = analogRead(fsrPin);
pot1Byte = analogRead(pot1Pin);
pot2Byte = analogRead(pot2Pin);
analogWrite(rPin, pot1Byte/4);
analogWrite(bPin, pot2Byte/4);
delay(fsrByte);
analogWrite(rPin, 0);
analogWrite(bPin, 0);
delay(fsrByte);
// Serial.println("FSR reads:");
// Serial.println(fsrByte);
// Serial.println("pot1 reads:" + " " + pot1Byte); // this syntax doesn't work?
}
Item
I don't know why this photo is so little. Visit my bigger, annotated version here:
http://www.flickr.com/photos/miffyg/1448569148/
heartheart
Comments
aww laura, if this were
aww laura, if this were attached to my heart, it would show you some erratic behavior after viewing your project :P Nice work!