analogWrite on A4 and A5 not working


#1

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() {
  pinMode(A4,OUTPUT);
  pinMode(A5,OUTPUT);
  pinMode(A6,OUTPUT);
  pinMode(A7,OUTPUT);
}

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?


#2

Hi @kimclausen,

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

Best regards,
Guohui


#3

Any update on this issue?