-
Notifications
You must be signed in to change notification settings - Fork 32
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
Accelerometer not working #25
Comments
Hi, no known issues (although that is not the same as no issues!) If you run the same program directly on the microbit using python.microbit.org, what do you see appear at the REPL from the micro:bit (the new web editor now supports WebUSB, so if you are on a recent version of the Chrome browser, you should be able to interact direct with the micro:bit at the repl prompt once connected). bitio was structured so that mostly you could take a host program and run it unmodified on the actual micro:bit to get near-identical behaviour. There were a small number of micro:bits with faulty accelerometers that responded in that way, but you should get an error code when the micro:bit boots if that is the case, see... https://support.microbit.org/support/solutions/articles/19000097285-050 Moving over from the two sensors to the combined sensor highlighted a number of 'older' micro:bits that had broken accelerometers, as the self-test workflow in the latest runtime was more rigorous in order to detect which sensor type was fitted. Start with the test I suggest above, and do report back. |
Also, note that the .hex loaded for bitio is just a bare microPython with a display.show(Image) in it for the bitio logo - the host side python pokes commands directly via a raw REPL over the serial port (a binary safe prompt with deterministic response characteristics, basically). So if you type 'print(accelerometer.get_values())' at the REPL prompt to a micro:bit loaded with a blank micropython program created by python.microbit.org, you will get the same response (I suspect) as you see in bitio - which might imply a device failure of some sort. |
For completeness, this is the device-side code of bitio, super simple, all the hard work happens at the host end...
|
Dragging and dropping bitio.hex into python.microbit.org will show you this code, and then pressing the download button 'bakes in' the latest MicroPython c++ runtime (which supports both older and newer sensor configurations in one image). |
Thanks a lot, it works ! |
Hi,
I have updated to the bitio.hex provided in the repo, but the accelerometer returns triple zeros.
This sample returns (0,0,0) even when the microbit is moved :
Here's my DETAILS.TXT :
Any known issues ?
The text was updated successfully, but these errors were encountered: