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

Allow to configure range (and rate?) of accelerometer #264

Closed
dpgeorge opened this issue May 3, 2016 · 4 comments
Closed

Allow to configure range (and rate?) of accelerometer #264

dpgeorge opened this issue May 3, 2016 · 4 comments

Comments

@dpgeorge
Copy link
Member

dpgeorge commented May 3, 2016

The accelerometer defaults to a 2g max range, but can do up to 8g. The DAL provides a function to get/set the range (and sample rate) of the accelerometer and we should probably expose this in Python. Eg:

accelerometer.set_range(8)
accelerometer.get_range()
accelerometer.set_rate(50) # 50Hz sample rate
accelerometer.get_rate()
@catchpolej
Copy link

I am right in thinking that a reading of 1024 using default settings is equal to 'g'?

@dpgeorge
Copy link
Member Author

dpgeorge commented Oct 6, 2016

I am right in thinking that a reading of 1024 using default settings is equal to 'g'?

The return value is is milli-g's, so 1000 is equal to 'g'.

@microbit-mark
Copy link
Contributor

This has been requested again recently in micro:bit support ticket: 37999

It looks like this PR is still open #266
is this something that we can implement? It seems a useful feature and would be comparable to our MakeCode editor.

@dpgeorge
Copy link
Member Author

set_range(value) was implemented in 3148254

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

Successfully merging a pull request may close this issue.

4 participants