Skip to content

Add resolution, filter, and oversampling #22

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

Merged
merged 4 commits into from
Oct 15, 2020

Conversation

caternuson
Copy link
Contributor

For #20 and should fix #21.

Tested with Itsy M0:

Adafruit CircuitPython 5.3.1 on 2020-07-13; Adafruit ItsyBitsy M0 Express with samd21g18
>>> import board
>>> import adafruit_mlx90393
>>> mlx = adafruit_mlx90393.MLX90393(board.I2C())
>>> mlx.magnetic
(-29.1, -27.0, -51.062)
>>> mlx.filter
7
>>> mlx.oversampling
3
>>> mlx.filter = adafruit_mlx90393.FILTER_3
>>> mlx.filter
3
>>> mlx.magnetic
(-28.95, -26.25, -51.062)
>>> mlx.oversampling = adafruit_mlx90393.OSR_1
>>> mlx.oversampling
1
>>> mlx.magnetic
(-29.55, -25.65, -52.756)
>>> mlx.resolution_x
0
>>> mlx.resolution_x = adafruit_mlx90393.RESOLUTION_19
>>> mlx.magnetic
(-27.646, -27.45, -49.61)
>>> mlx.resolution_y = adafruit_mlx90393.RESOLUTION_19
>>> mlx.magnetic
(-32.454, -25.242, -50.578)
>>> mlx.resolution_z = adafruit_mlx90393.RESOLUTION_19
>>> mlx.magnetic
(-31.252, -28.848, -52.272)
>>> mlx.resolution_x, mlx.resolution_y, mlx.resolution_z
(3, 3, 3)
>>> 

@ladyada
Copy link
Member

ladyada commented Oct 15, 2020

looks good and i trust ya that it works. plz black and then you can merge!
hopefully fewer people will use this chip once the 395 breakout is available, as the 395 has more-sane-i2c

@caternuson caternuson merged commit d13a2ca into adafruit:master Oct 15, 2020
@ladyada
Copy link
Member

ladyada commented Oct 15, 2020

lol

adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Oct 16, 2020
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

Successfully merging this pull request may close these issues.

Default CONF3 setting is not usable?
2 participants