I am trying to get an RGB Led to flash the 3 colors.
I have some code which works fine on the Core and I used pins : A5 = Red, A6 = Green, A7 = Blue
I read this post about the changes in pins
So I plug the Photon into the same breadboard and I swap the pins : A4 = Red, A5 = Green, A7 = Blue
Except now only the Blue color shows.
Is there something else I need to do? Are the names A4 / A5 invalid (I would have expected an error if so).
The pin names are still valid and these pins should still work, but as stated in the thread you linked for A4 and A5 you have to ensure that you are not using PWM (or other timer functions) on D2 and D3 at the same time.
Provided of course you have got the LED wired correctly (suitable resistors for each individual color) and the sub LEDs do still live (test with digitalWrite()).
I think the sample code with only show_color(rgbLed.BLUE); active was the worst you could have chosen to post, when you ask why do I only see blue?
Could you just try to add a WHITE setting with all three pins 255?
The funny thing with PWM 255 is that it internally is not PWMed but gets converted into a digitalWrite(HIGH) (at least this was true, last time I went through the implementation of analogWrite() before HAL).
But as it should work, the cause might be something completely different.
Could you maybe add some serial debug statements that also print out the pin numbers for R, G and B?
I guess the most likely issue is a C problem since Im pretty bad at that, but I think its a subtle problem because it works on the Core. Or possibly a timing issue since the Photon is a lot faster.
There used to be a Photon PWM issue where the PWM always got reset/retriggered when analogWrite() was called and if this happened very rapidly it could be that the pin never actually PWMed but always was HIGH or LOW.
But this issue should have been solved already (pre 0.4.4) and should not hit when you do a 255.
On the other hand, just to be sure, try to only analogWrite() when the values change.
But for a quick test - which I should have suggested a lot earlier - just try flashing this
On the Photon, this function works on pins D0, D1, D2, D3, A4, A5, WKP, RX and TX with a caveat: PWM timer peripheral is duplicated on two pins (A5/D2) and (A4/D3) for 7 total independent PWM outputs.
NOTE: pinMode(pin, OUTPUT); is required before calling analogWrite(pin, value); or else the pin will not be initialized as a PWM output and set to the desired duty cycle.