alexismeneses / py-adxl345 Goto Github PK
View Code? Open in Web Editor NEWPython driver for ADXL345 accelerometer
License: MIT License
Python driver for ADXL345 accelerometer
License: MIT License
Hello Alexis,
i'd like to get working singletap, doubletap and freefall which adxl345 provide as HW features, so i forked your project and looked an old lib [0] trying to re-create the functions used for tapping.
Unlucky i'm a self teached programmer so i was only able to add Pitch&Roll [1] to your code, whilst it get hard to me play with hex address and bitwise operations. After many tries i feel to be close to the solution but it still doesn't work.
Can you please give me an hand and try to add Tap in your code?
Thank you :)
[0] http://think-bowl.com/raspberry-pi/i2c-python-library-3-axis-digital-accelerometer-adxl345-with-the-raspberry-pi/
[1] http://theccontinuum.com/2012/09/24/arduino-imu-pitch-roll-from-accelerometer/
base.py >
at line 285:
self.set_offset(offset_x, offest_y, offset_z)
must be:
self.set_offset(offset_x, offset_y, offset_z)
Otherwise
"offest_y" is not defined
nvm, sorry
spi.py >
at line 30
self.spi.writebytes( [ address & 0x3F ] | READ_MASK | MULTIREAD_MASK )
must be
self.spi.writebytes( [ address & 0x3F | READ_MASK | MULTIREAD_MASK ])
otherwise it raises TypeError
TypeError: unsupported operand type(s) for |: 'list' and 'int'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.