Skip to content

Adding a named tuple for acceleration #27

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 2 commits into from
Mar 19, 2018
Merged

Conversation

Sigafoos
Copy link
Collaborator

@Sigafoos Sigafoos commented Mar 12, 2018

Fixes #12

@tannewt
Copy link
Member

tannewt commented Mar 12, 2018

@jerryneedell or @hukuzatuna mind testing this? The code looks good to me.

@jerryneedell
Copy link
Contributor

This is next on my “to do” list. Hopefully tomorrow.

@jerryneedell
Copy link
Contributor

jerryneedell commented Mar 19, 2018

tried this on a CircuitPlayGround_express with CP 3.0-alpha - current master.

 Adafruit CircuitPython 3.0.0-alpha.3-2-gbf42611-dirty on 2018-03-18; Adafruit CircuitPlayground Express with samd21g18
>>> 
>>> import time
>>> import board
>>> import adafruit_lis3dh
>>> 
>>> import busio
>>> i2c = busio.I2C(board.ACCELEROMETER_SCL, board.ACCELEROMETER_SDA)
>>> lis3dh = adafruit_lis3dh.LIS3DH_I2C(i2c,address=0x19)
>>> lis3dh.range = adafruit_lis3dh.RANGE_2_G
>>> dir(lis3dh)
['__qualname__', '_write_register_byte', '_read_register', '__module__', '__init__', '_int1', '_int2', '_i2c', '_buffer']
>>> lis3dh.acceleration
acceleration(x=0.153256, y=0.0862066, z=9.93291)
>>> 

looks OK to me - anything in particular that needs to be checked?

Doesn't seem to break anything. Previous test programs still run OK.

@kattni
Copy link
Contributor

kattni commented Mar 19, 2018

Thanks for testing it @jerryneedell! Approved!

@kattni kattni merged commit dc7da90 into adafruit:master Mar 19, 2018
tannewt pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Mar 19, 2018
@caternuson
Copy link
Contributor

May want to future proof the import since there's a plan to rename the u... modules.

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.

5 participants