microsoft / microsoft/pxt-microbit
Accelerometer gestures do not fire
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 804
- Forks
- 721
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 2
Description
Describe the bug
Using the micro:bit with an Arcade shield and the "on shake" event never seems to be triggered.
It does start working when the block for x/y/z accelerometer values is executed.
This might be related to https://github.com/microsoft/pxt-arcade/issues/2349, but it's marked as completed.
Opening this on behalf of @microbit-giles who was able to provide these examples, he did try to produce a smaller programe to replicate the issue, but wasn't as straight forward to achieve and he run out of time before their leave:
- tilty paint: Original project, it should move the paint blob when you tilt left and right, and clear the screen when you shake it. These functions work in the simulator, but not on a V2 plugged into the KittenBot Newbit shield.
- tilty paint 2: Identical version, except it adds 'on logo pressed show number acceleration (mg) x'
- The tilt and shake gestures do not work - until you touch the logo! Then it works as expected
To Reproduce
Steps to reproduce the behavior:
- Open tilty paint
- Load it into a micro:bit with an Arcade shield
- Tilt or shake the board, events are not triggered
- Add "get acceleration" blocks to the forever loop (or open tilty paint 2)
- Redownload the new programme to the micro:bit
- Accelerometer gestures work once the the get acceleration block is executed
Expected behavior
Accelerometer gestures to be triggered
Screenshots
N/A
Desktop (please complete the following information):
N/A
Smartphone (please complete the following information):
N/A
Additional context
N/A
Contributor guide
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.