microsoft / microsoft/pxt-maker

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

Open
#273 0 comments 0 reactions 0 assignees View on GitHub

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.

#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):

  • 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.
image
image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.