microsoft / microsoft/pxt-maker

RedBoard Turbo w/ Buttons

Open
#193 6 comments 0 reactions 1 assignee View on GitHub

@pelikhan is already working on this.

Since Feb 28, 2019.

bug redboard
Dominant language
TypeScript
Stars
130
Forks
90
Avg merge
1d 14h
Merged PRs (30d)
1

Description

Describe the bug
There seems to be no internal pull-up resistor for a button press leaving any button floating as shown in the simulator. I'm not sure if we would need to include an image of a pull-up resistor in the simulator just like the LED's current limiting resistor for those that happen to use a button/switch?

To Reproduce
When attaching a momentary push button on any I/O pin, the pin is floating.

  1. Drag the logic > if then code block in to the forever.
  2. Drag and set button D8 is pressed into the if's condition statement.
  3. Drag and set pin > digital write pin LED to HIGH as the result.
  4. Drag and set pin > digital write pin LED to LOW under the else's result.

This can be fixed with a physical pull-up resistor to the 3.3V pin or setting the pin as an internal pull-up code block (i.e. set pull pin ____ to up). That might be more work than necessary since it depends on the setup. It will probably just need an example for documentation instead of having it in the simulator?

Expected behavior
Pushing a button should turn on the built-in LED on pin 13. When the button is not pressed, the LED should remain off.

Screenshots
https://makecode.com/_FiU3hK5AADCW

Desktop (please complete the following information):

  • OS: Windows 10 (64-bit)
  • Browser: Chrome
  • Version: 72.0.3626.109 (Official Build) (64-bit)

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.