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

Accelerometer not working on Micro:bit #85

Closed
mrfabroa opened this issue Feb 17, 2019 · 3 comments
Closed

Accelerometer not working on Micro:bit #85

mrfabroa opened this issue Feb 17, 2019 · 3 comments

Comments

@mrfabroa
Copy link

Accelerometer on the Micro:bit does not work when flashing with the MicroPython plugin in Pycharm. Readings from the accelerometer remain at 0 for all axis as indicated by printing to the REPL and displaying to the device. uFlash 1.08 was used in this case.

This issue does not occur when flashing the same code to the device using the MU Editor, where accelerometer output works as expected. The same Python 3.6 interpreter was used when testing both (Pycharm, MU Editor) environments.

from microbit import *

while True:
    sleep(1000)
    x_val = accelerometer.get_x()
    print(str(x_val))
    display.scroll(str(x_val))
@carlosperate
Copy link
Contributor

It's possible this is because this plugin is using an old version of uFlash, as Mu uses a newer version.
PR #79 should fix this issue.

@fzymek
Copy link

fzymek commented Mar 30, 2019

👍 oh wow, this would be awesome to have it

@vlasovskikh
Copy link
Contributor

@mrfabroa I've just accepted PR #79 by @carlosperate. I'll release a new version of the plugin soon.

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

No branches or pull requests

4 participants