microsoft / microsoft/pxt-maker
RedBoard Turbo w/ Buttons
@pelikhan is already working on this.
Since Feb 28, 2019.
- 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.
- Drag the
logic > if thencode block in to the forever. - Drag and set
button D8 is pressedinto the if's condition statement. - Drag and set
pin > digital write pin LED to HIGHas the result. - Drag and set
pin > digital write pin LED to LOWunder 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
- 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.
Assessment
This issue has not been assessed yet.