Hello,
Today I stopped down at the hardware store, and picked up a RGB LED which appeared to be unlabled, but turned out to be a common anode after an hour of trial and error figuring out and learning from my mistakes.
I’ve googled around a bit, but haven’t found much of any use of the results.
Is it possible to wire this particular LED to the Photon and use analogWrite() to change the colors, or even if possible to reverse the polarity of the specified PWM pins on the board?
Yes you can use common anode LEDs with the Photon’s PWM pins, you just need to invert your PWM duty cycle (0…LED full brightness, 255…LED off).
Or you add an inverting transistor (grounded emitter circuit) or similar external circuitry.
For direct control you’d wire the LED like this
PWM pin -> current limiting resistor -> LED -> 3V3 pin.