Discussion Forums

analogWrite on A4 and A5 not working


According to the Photon documentation analogWrite (PWM) is available on 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). On the Redbear Duo pinout diagram (on Github) PWM is also available on A0, A1, A6 and A7.

I could not get any PWM output working on A4 and A5, but working on A6 and A7. I’m not using D2 and D3. I tested with the following code:

void setup() {

void loop() {
  analogWrite(A4, 100);
  analogWrite(A5, 130);
  analogWrite(A6, 160);
  analogWrite(A7, 210);

Exactly which pins can be used for PWM on the Redbear Duo?


Hi @kimclausen,

We did produced this issue as well. And we will look into it.

Best regards,


Any update on this issue?