microsoft / microsoft/pxt-maker
MakeCode does not recognize all PWM-capable pins on Adafruit Metro M0 Express
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 130
- Forks
- 90
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 1
Description
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.
To Reproduce
Steps to reproduce the behavior:
- Go to https://maker.makecode.com/
- Create a new project and choose Adafruit Metro M0 Express as the target hardware
- From the PINS menu on the left side, drag a red
analog write pin LED to 1023block into the greenforeverloop. - Click
LEDin the analog write block to see list of available analog write output pins. See that some are missing.

- Switch to JavaScript view and change the command to pin
D11instead ofLED

Expected behavior
See an accurate list of all PWM-capable pins including D3-D6 and D8-D13.
Desktop (please complete the following information):
- OS: Windows 10
- Browser: Chrome
- Version: 79.0.3945.130
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.


Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Adafruit Metro M0 Express target configuration and the MakeCode PINS menu's analog write pin list, then compare it with the PWM-capable pins described in the linked documentation. Reproduce the issue in a new Metro M0 Express project and verify that D3-D6 and D8-D13 appear as valid analog output pins.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100