Oximeter LEDS test successful

October 16, 2009

Made good progress on my oximeter today. Completed step 1 & 2. I built a transistor H-bridge to drive back-to-back LEDS for multiplexed information. Used my Boarduino, and noticed that to upload program the boarduino needs to be disconnected from 5v circuit. Here is the code:

/*
Oximeter Pulse
October 16, 2009
Breadboard Test
Andrew BarneyTurns on an Transistor H-bridge back-to-back LEDS on to send multiplexed data.The circuit:
* Back-to-Back LEDS connected to digital pin 3 and 4.

http://arduino.cc/en/Tutorial/Blink

*/

int ledPin = 3; // LED connected to digital pin 13
int ledPin2 = 4; // LED connected to digital pin 13

// The setup() method runs once, when the sketch starts

void setup() {
// initialize the digital pin as an output:
pinMode(ledPin, OUTPUT);
pinMode(ledPin2, OUTPUT);
}

// the loop() method runs over and over again,
// as long as the Arduino has power

void loop()
{
digitalWrite(ledPin, HIGH); // set the LED on
digitalWrite(ledPin2, LOW); // set the LED off
delay(100); // wait for a “second”
digitalWrite(ledPin, LOW); // set the LED off
digitalWrite(ledPin2, HIGH); // set the LED on
delay(100); // wait for a “second”
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s