Go Down

Topic: Super Noob - 7-Color LED (Read 3018 times) previous topic - next topic

I just got my Arduino Uno.  I ran to Radio Shack and bought some LEDs.  One of the LED's  I bought is a 7-Color Blinking LED(Radio Shack Part # 276-0016). 

I started looking on Google and I found this video explaining how the LED works.  http://www.youtube.com/watch?v=muWT4EA5fHU

Here is the code  that I started trying to get it to cycle through the 7 colors.  I can not figure out how to link the Control pin to the Ground. 

I might not even be on the right track but I thought I would ask.  Thanks for the help.


Code: [Select]

int neg =  13;    // +LED connected to digital pin 13
int pos =  12;    // -LED connected to digital pin 12
int crtl =  11;  // control coonected to digital pin 11

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

void setup()   {               
  // initialize the digital pin as an output:
  pinMode(neg, OUTPUT);
  pinMode(pos, OUTPUT);
  pinMode(crtl, OUTPUT);
  digitalWrite(pos, HIGH);    // set the LED on
  digitalWrite(neg, LOW);   // set the LED off
  digitalWrite(crtl,LOW);  //ser the crtl off
  delay(15000);                  // wait for 15 second
}
// the loop() method runs over and over again,
// as long as the Arduino has power

void loop()                     
{
digitalWrite(crtl, HIGH);
delay(250);
digitalWrite(crtl, LOW);
delay(250);

 

}


JBMetal

Unfortunate that there is no specification on the radio shack website for this and my connection to youtube is acting up ..

Is there a little black dot inside the LED. If so this is probably a built in silicon chip that does the color/cycle choosing for you so you are right about the control pin that needs to be toggled.

Try connecting the postive to the pin (as you have it) and the negative to ground (via a resistor!)

Msquare

The microprocessor chip is NOT a powersupply !!  Stop using the pins to supply the power (the + and -) this may damage your chip.  The Arduino board has a GND and a 5V pin - these come from the USB-power (or the external power adjusted to 5v by the onboard regulator) so they can give you enough power without risk.

Your code is correct - except you ONLY need to use the "Ctrl pin" related code.

Why do you ask about "link the Control pin to the Ground"? Doing the HIGH LOW toggle effectivly grounds the ctrl signal to ground.

Lastly, the LED may burn out when getting 5V. Put a resistor between 2000 and 300 ohm between the 5V and the +LED. I found some tiny bit of documentation

CrossRoads

Here's the datasheet
http://www.dz863.com/downloadpdf-cfloxgvdkiju-MSGBB557TA.pdf

I like the link you found that discusses the modes that seem possible.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up