![]() |
Acceleration of Gravity Tilt Module for Arduino - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PINE A64(+) (https://forum.pine64.org/forumdisplay.php?fid=4) +--- Forum: Pine A64 Hardware, Accessories and POT (https://forum.pine64.org/forumdisplay.php?fid=32) +---- Forum: Pi2, Euler and Exp GPIO Ports (https://forum.pine64.org/forumdisplay.php?fid=34) +---- Thread: Acceleration of Gravity Tilt Module for Arduino (/showthread.php?tid=1629) |
Acceleration of Gravity Tilt Module for Arduino - JulianM - 07-03-2016 Hi together! I'm searching for a way to use the automatic orientation on Android. So, which accelerometers will work with the Pine64? I found a very cheap module, original for Arduino. It works via GPIO. - ADXL345 3-Axes Digital Acceleration of Gravity Tilt Module for Arduino GY-291 EV For just 1.08 Euro! Best regards Julian RE: Acceleration of Gravity Tilt Module for Arduino - xalius - 07-03-2016 I just extracted a device tree from the Android image for LCD, to look at the LCD config... but I found also the following: some acc, gyro, light and compass sensors seem to be defined for the I2C bus... maybe try one of those? Code: gsensor { RE: Acceleration of Gravity Tilt Module for Arduino - jodybrown99 - 07-13-2016 i think that sensor might actually work... that device tree says for gsensor: gsensor_twi_addr = <0x0000001d>; and the datasheet for the ADXL345 says Quote:I2Cnotice the address 0x1D part. if you get one, let us know if it works. RE: Acceleration of Gravity Tilt Module for Arduino - MarkHaysHarris777 - 07-13-2016 This is what I'm planning to use one of my pyboards (MicroPython) for... it has a built-in accelerometer that can be programmed in python. Your PineA64 board can talk to the pyboard at the high level (serial, GPIO, bluetooth) and the pyboard can handle the accelerometer stuff. marcus RE: Acceleration of Gravity Tilt Module for Arduino - jodybrown99 - 08-06-2016 i bought two of those adxl345's from ebay http://www.ebay.ca/itm/191674294902 i plugged into the i2c-1 connection on the pi bus, pins 3 and 5 it does work under linux (on both my pine64 and my CHIP) i made this script read it: https://github.com/jodybrown/adxl345/blob/master/adxl345.sh it also works on arduino (used code from https://learn.adafruit.com/adxl345-digital-accelerometer/overview) sadly, it does not seem to do anything under android, either in the hdmi image or the lcd image. maybe it has to be connected to different pins or something. i notice in the code above it says TWI but i had it connected to I2C. i did try to connect to 27/28 but that did nothing. using i2cdetect nothing shows up for 0x1d, just 0x53... |