microsoft / pxt-maker

MakeCode target for "Maker" boards (beta)
https://maker.makecode.com/
Other
116 stars 82 forks source link

MakeCode does not recognize all PWM-capable pins on Adafruit Metro M0 Express #273

Open gorrat opened 4 years ago

gorrat commented 4 years ago

Describe the bug According to the documentation for the Adafruit Metro M0 Express, Digital Pins D3-D6 as well as D8-D13 are all capable of PWM output. The analogWrite function of the MakeCode editor only allows pins A0-A5, D0, D1, D3, D4, D8, D9 and RX as output pins.

#2 through #12 - These are general purpose GPIO. If there's a dot next to the pad it can act as a PWM output.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://maker.makecode.com/
  2. Create a new project and choose Adafruit Metro M0 Express as the target hardware
  3. From the PINS menu on the left side, drag a red analog write pin LED to 1023 block into the green forever loop.
  4. Click LED in the analog write block to see list of available analog write output pins. See that some are missing. image
  5. Switch to JavaScript view and change the command to pin D11 instead of LED image

Expected behavior See an accurate list of all PWM-capable pins including D3-D6 and D8-D13.

Desktop (please complete the following information):

Additional context The tooltip in the JavaScript editor indicates that pins.D3 is a PwmPin, and pins.D11 is a DigitalInOutPin Add any other context about the problem here. image image