microsoft / microsoft/pxt-microbit

Accelerometer gestures do not fire

Open
#7,083 19 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

hardware
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:

  1. Open tilty paint
  2. Load it into a micro:bit with an Arcade shield
  3. Tilt or shake the board, events are not triggered
  4. Add "get acceleration" blocks to the forever loop (or open tilty paint 2)
  5. Redownload the new programme to the micro:bit
  6. 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

Open the contributing guide

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.