RGB LED

Off topicElectronics → RGB LED

So i ordered 50 RGB LED’s for about £3 and i dont really know what to do with them as all i had in mind was a colour selector but that is all i can think of and it is a bit pointless making around 50 of them. I have access to a soldering iron, resistors, switches, momentary buttons and other stuff.
RGB cube with an arduino
That’s actually hard to do. Harder than you think! RGB led cube you would have to either multiplex the LEDs or Charlieplex them which takes skill. @pokemon555222 @nalaek2004
Who here knows a lot about, or has worked with muti-color LEDs? Just wondering.
I’ve worked with them a leedleleedle bit in the past. Don’t ask me. Mine just used different imputs and a ground oc to operate
I have some LEDs that cycle through the colors, and I wondered if anyone knew how to make it stay on one color constantly?
@hackerthomas @chloetherat I know plenty about RGB (multi color) LEDs

@Joel_GI

Then do you know the process of making a muti-color LED (that cycles through 6 different colors), output one color solid on?

AFAIK mutlicolor leds have 3 pins, 2 is for vcc and vdd, and the third should be to set color, now not speaking from experience, but im guessing its a analog thing ? Perhaps PWM. Ive not really worked with mutlicolor leds before, but the LED cube isnt that hard to make, just use shift registers ;)

Thanks @PanFritz. It is PWM. I was given this mouse that has 3 LEDs that cycle through. I want to make it so it stays on one color. I’m new to muti-color, so I don’t exactly know what to do, to have a one color constant output if that is possible. I think I need to do something with the micro controller.

Here is some more information on Muti-Color LEDs

Yeah just keep the PWM at a constant level :)
@PanFritz you say that shift registers aren’t hard but in reality you would need a lot of them for a decent sized cube. But I like your thinking! PWM will work. Most Multi Color (RGB) LEDs run off of a driver chip like a ws2811 or ws2812b (the most common chips) and they require some simple software drivers for easy coding. I would suggest finding out what chip you have then go from there.
Lol its easy, ofc there are diffrent types of shift registers, but the most simple ones have input pin and clock pin, thats about it (Yes they also have fancy output regs and stuff but not needed for my explanation) all you do is use 1 line of a microcontroller for a clock line for all of the shift registers, and 1 line as the input for the first, then take the last bit of the first and use it as a input for the second and so on. Effectively having unlimited outputs that can be totaly in sync using that reg line

Okay. He said this is the mouse

A lot of people were asking the same question on how to stop it from cycling through all the colors. The answer is no due to there not being any software to change shit. So now I am wondering if there is a hardware way to do it?

Here is a picture of the insides of the mouse Closer picture of components circuit board

There are actually 4 wires that go into each LED.

Ah yes, i checked it out a bit, well i dont see how you have it cylcing anyway, just have a constant signal

The cycling is the way it came. It is annoying as fuck and I wish there was a way to change it. It is the micro controller outputting different signals like this:

I want the cyan color constant, so I first need to have only the Green & Blue ON, then find a way to have them always ON.

I could easily cut the Red wire, but that wouldn’t exactly get me where I want.

Great so you figured that much out,(from a bit of reading i read the fourth pin is a power pin) So you digitalWrite(1) to the pins you dont want to be turned on, and then analogWrite(a value) to the pins you want to be on. (blue and green) maybe both at 512 value giving it 50/50. idk
How would I go and write this data to the pins? Is there software to edit the micro controller code?

This is not exactly rocket science… Wrote you a struct you can use if you wish.

struct RGB_Led
{
	uint8_t redPin;
	uint8_t greenPin;
	uint8_t bluePin;


	RGB_Led(uint8_t red, uint8_t green, uint8_t blue)
	{
		redPin = red;
		greenPin = green;
		bluePin = blue;

		pinMode(red, OUTPUT);
		pinMode(green, OUTPUT);
		pinMode(blue, OUTPUT);

		digitalWrite(red, LOW);
		digitalWrite(green, LOW);
		digitalWrite(blue, LOW);
	}

	void setColor(uint8_t red, uint8_t green, uint8_t blue)
	{
		analogWrite(redPin, red);
		analogWrite(greenPin, green);
		analogWrite(bluePin, blue);
	}



};

RGB_Led led(3, 5, 6); // Make sure these pins are PWM compatible.

void setup()
{

	pinMode(4, OUTPUT); //These two lines are just my ground pin X) couldnt be bothered acctualy pluging it into ground.
	digitalWrite(4, LOW);
	
	
	led.setColor(50, 10, 30); // And have fun.
 
}

void loop()
{

  /* add main program code here */

}
Thanks man. I’ll see what I can do. :p
I really prefered the old color scheme of code blocks… meh
@hackerthomas I’m not familiar with this stuff, but can’t you just get a cyan LED insted of coding shit in?

@yop_tropix

I thought about that, but I the micro controller is outputting a slow breathing like pulse; I would still need to modify something to keep it always on. Or maybe I could just by pass all that shit and just tap a normal Cyan LED into the power. Maybe this?

em idk what you are saying hacker but, if you only had a cyan LED you would just digitalWrite() to that pin… it doesnt always have to be a PWM.
Oh shit, you are modifing the mouse? i thought you were acctualy building something with LED’s haha. Well idk i wouldnt suggest touching its microcontroller…
Oh lmao, I thought you knew.

Emmm sure this is easy :!

Put a pull down resistor on the pin that has to be off, then pullup pin to the pins that have to be on HF :D

So put a pull down resistor just on the RED? Why not just cut it off since we don’t need it at all?

I’m confused on your last sentence. Pull up resistor? “HF”?

Well if you want to cut it go ahead, might work a bit better , HF = Have fun, pull up resistors means resistor between the pin and vcc