Go Down

Topic: We've figured it out. Problem solved!! (Read 5922 times) previous topic - next topic

AKSoapy29

Dec 26, 2010, 08:36 pm Last Edit: Dec 27, 2010, 08:31 pm by Soapy29 Reason: 1
[size=24]POST DONE! PROBLEM SOLVED!! :D[/size]

We've figured it out, so you do need to see this.
Andrew K.

CrossRoads

Generally:
digitalPin = 2; // can go up to 19 for Uno's - 0/1 are the Rx/Tx pins for downloading, leave free if able

pinMode (digitalPin, OUTPUT);
digitalWrite (digitalPin, HIGH);

will sit high until commanded Low;
digitalWrite (digitalPin, LOW);
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.

AKSoapy29

#2
Dec 26, 2010, 08:57 pm Last Edit: Dec 26, 2010, 09:08 pm by Soapy29 Reason: 1
Lemme tell you what I'm doing.

I'm controlling a RGB led with 3 push buttons. The problem is, I need to reverse the power from Ground to 5V. I just don't know how to do it.. My led is backwards you could say...
Andrew K.

Grumpy_Mike

Quote
The problem is, I need to reverse the power from Ground to 5V.

No you don't you need to wire it up the other way round. Wire the common anode to +5v then from each cathode lead of the LED connect it first to a resistor then the arduino output. That's 3 outputs.
The writing LOW to the pin turns on the LED and writing HIGH turns it off.

CrossRoads

Are your LEDs wired in one of these ways?
The upper LEDs will turn on when the output is low

The lower LEDs will turn on when the outoput is high

The pins can PWM outputs also, will still turn as described above.

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.

AKSoapy29

There's only one led and none of this makes sence. + goes to +, - goes to -..   :-? For leds
Andrew K.

AWOL

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

AKSoapy29

Here's a picture. My camera stinks, ever though it's 7.1 MP...

Andrew K.

AWOL

I see a red cross.
Way fewer than 7MPix
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

AKSoapy29

Andrew K.

AKSoapy29

I've seen phones with more MP on them. I bet my iPod is better!
Andrew K.

CrossRoads

#11
Dec 26, 2010, 09:44 pm Last Edit: Dec 26, 2010, 09:47 pm by CrossRoads Reason: 1
Your pic has this for properties
http://www.vexforum.com/gallery/files/2/0/5/5/7/img_3102.jpg
maybe all the /'s are supposed to be something else?


If you have an RGB LED as you say, then it should look like one of these, and will turn as we indicated.
Can you post a link to the LED that you bought?

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.

AKSoapy29

I have the top one, but flip blue and green and it will match. 3 is negative and the rest are positive.
Andrew K.

CrossRoads

Connect it up like I showed for pins D2, D3, D4 above. High output will turn the LEDs on.
Use a 270, 300, 330 ohm resister, something in that range, for each of the color legs.
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.

AKSoapy29

It does not fade, and the only colors it has are red, green, and blue.
Andrew K.

Go Up