Giter Site home page Giter Site logo

python-lis3dh's People

Contributors

holzfigure avatar malsmalley avatar mattdy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

python-lis3dh's Issues

Does not work with new restructed libs from Adafruit

Hi Matt,

great work! It helped me a lot!

But unfortunately there are small issues with the new restructured gpio/i2c libs from Adafruit.

There were 3 changes required to get it working for me:
in file LIS3DH.py:
a) line15: The import must be changed from from Adafruit_I2C import Adafruit_I2C to import Adafruid_GPIO.I2C as I2C
b) line 94: further the instanciaton from self.i2c = Adafruit_I2C(address, busnum=bus) to self.i2c = I2C.Device(address, busnum=bus)

in file testLIS3DH.py
c) line 16: the init of the sensor object need the bus number: sensor = LIS3DH(debug=True) to sensor = LIS3DH(bus=1,debug=True)

Thank you!
Best Regards

Michael

Implement ADC reading

The LIS3DH has 3 analogue-to-digital converters on board. Currently these are not exposed through this library.

The datasheet section 8.2 refers, example C code here

Deprecated?

Adafruit has deprecated the Adafruit_Python_GPIO library (see https://github.com/adafruit/Adafruit_Python_GPIO) in favour of 'blinka' (https://github.com/adafruit/Adafruit_Blinka), which allows to use their full-fledged CircuitPython code for the sensor (https://github.com/adafruit/Adafruit_CircuitPython_LIS3DH).

The blinka library is exclusively for Python 3, so if you need a Python 2 compatible library for the sensor, this library here might still be useful. (I recently switched to using the CircuitPython library and it works perfectly.)

I want to thank @mattdy for providing this, it helped me a lot in the past few years!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.