Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shake event not working on micro:bit v1.3? #11

Open
microbit-giles opened this issue May 24, 2021 · 6 comments
Open

Shake event not working on micro:bit v1.3? #11

microbit-giles opened this issue May 24, 2021 · 6 comments

Comments

@microbit-giles
Copy link

In testing the development code.org AppLab app, I can't get 'on shake' events to work on a v1.3 micro:bit (with separate compass and accelerometer chips) but they do work on a 1.5 board (combined single compass and accelerometer).
Is there something in Firmata that could explain this and be fixed?

@carlosperate
Copy link

There shoudn't be a reason that doesn't work, is using DAL and when this was released micro:bit v1.3 and v1.5 were both fully supported.
Do the events trigger with a normal MakeCode application in that micro:bit?

@microbit-giles
Copy link
Author

microbit-giles commented May 25, 2021

Yes a normal MakeCode project with 'on shake' works fine on the same board.

It would be useful if someone else could test AppLab with a 1.3 board to see if they can reproduce the issue. There are details on how to use in in the edu team Dropbox: 04. Education/Partners/Code.org/tech/

My board details.txt file in case it's any help:

# DAPLink Firmware - see https://mbed.com/daplink
Unique ID: 9900000032044e4500148008000000650000000097969901
HIC ID: 97969901
Auto Reset: 1
Automation allowed: 0
Overflow detection: 0
Daplink Mode: Interface
Interface Version: 0250
Git SHA: 682d8303e37355532402b8d93c4f240a3cec02a9
Local Mods: 0
USB Interfaces: MSD, CDC, HID, WebUSB
Interface CRC: 0x3f2b7e12
Remount count: 1
URL: https://microbit.org/device/?id=9900&v=0250

@microbit-carlos
Copy link

@microbit-giles it's been a while but do you know if this issue is still present?

@microbit-giles
Copy link
Author

@microbit-carlos No idea I'm afraid - not had chance to look at this in a long time.

@martinwork
Copy link
Contributor

@microbit-carlos I did a quick test with microbit-firmata-v1.1.hex, and mbTests.js. My impression was that 1.3, 1.5 and 2.0 all behaved about the same. 1.3 with microbit-firmata-v1.0.hex felt similar.

It seemed that not every shake caused the shake counter to increment. There were perhaps some 1.3/1.5 differences in the number of times I saw 3G, and I noticed "undefined" events with 2.0.

By contrast, with a MakeCode program that counts shakes in "on shake", and displays the count in forever, it seemed easier to generate a shake, and felt more like it counted every shake.

@microbit-carlos
Copy link

Thanks for the testing Martin, that's very interesting.

I assume the "on shake" MakeCode block is subscribing to the shake event that CODAL triggers, which I think this project does as well, not sure why the results would be different.

Either way, it sounds like the difference is not too significant, so we can probably park this and return to it if we find the difference to be more pronounced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants