I wonder if anyone can help me, a complete beginner, with a very basic question? I currently have a red LED connected to a GPIO pin on a Raspberry Pi, and a green LED attached to a different GPIO pin. Both pins output 3.3v, and I have a 330 resistor on the anode of each LED. Ground is shared, as in the diagram below:
I want to fit this onto as as small a PCB as possible. From my (very) basic understanding, I think I can get away with a single 330 resistor on the between the two LEDs and ground, as in this diagram:
Am I correct in this? Many thanks.
Edit: It seems that I have asked a question that has been raised multiple times. As a complete novice, I wasn't aware that this is regarded as the LEDs being in parallel (I thought that two power sources differentiated this from the other parallel LED questions I saw posted). Anyway, I thank those who took the time to help, and I will attempt to digest the responses.