Skip to content
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

Connecting the ADXL345 accelerometer to the Raspberry Pi 3 #3

Open
ccamacho opened this Issue Jul 5, 2016 · 17 comments

Comments

Projects
None yet
5 participants
@ccamacho
Copy link
Member

ccamacho commented Jul 5, 2016

No description provided.

@bretcj7

This comment has been minimized.

Copy link

bretcj7 commented Jan 18, 2017

Great blog post, worked effortlessly and no issues. Thank you.

@ccamacho

This comment has been minimized.

Copy link
Member Author

ccamacho commented Jan 30, 2017

Awesome you like it!

@pimyride94

This comment has been minimized.

Copy link

pimyride94 commented Jul 6, 2017

Just a question before I choose which accelerometer to buy. The ADXL345 isn't an analog accelerometer? That way don't I need an A/D converter for it to work on my raspberry pi 3 model B?

@bretcj7

This comment has been minimized.

Copy link

bretcj7 commented Jul 6, 2017

Its digital. Works with I2C or SPI just hook up on the correct GPIO pins.
http://www.analog.com/media/en/technical-documentation/data-sheets/ADXL345.pdf

@pimyride94

This comment has been minimized.

Copy link

pimyride94 commented Jul 6, 2017

@Haroldov

This comment has been minimized.

Copy link

Haroldov commented Oct 26, 2017

Hola, seguiste trabajando con este acelerometro? Vi que pusiste que el siguiente blog del acelereometro seria trabajarlo en tiempo real pero no he podido encontrar ese blog. Quitame la duda y muchas gracias!

@pimyride94

This comment has been minimized.

Copy link

pimyride94 commented Oct 27, 2017

@ccamacho

This comment has been minimized.

Copy link
Member Author

ccamacho commented Oct 27, 2017

Yeah, I did some more research about it but didn't have the chance to write all down. @pimyride94 @Haroldov we can sync if you want to write about it.

@kacunar

This comment has been minimized.

Copy link

kacunar commented Oct 27, 2017

@ccamacho @pimyride94 i want to know what is the use of the BW_RATE in the class code.

@ccamacho

This comment has been minimized.

Copy link
Member Author

ccamacho commented Oct 27, 2017

Its how frequent you will get the accelerometer measurements. More info here: https://www.dimensionengineering.com/info/accelerometers

@kacunar

This comment has been minimized.

Copy link

kacunar commented Oct 27, 2017

@ccamacho yes but I couldn't implement this rate in the code. Can you help me with this?

@ccamacho

This comment has been minimized.

Copy link
Member Author

ccamacho commented Oct 27, 2017

@kacunar those values represent registers rate codes, you can check the accelerometer specification at https://www.sparkfun.com/datasheets/Sensors/Accelerometer/ADXL345.pdf

In any case, I'll give you an example, the 1600HZ rate (in the code) corresponds with a 1111 rate code (base 2), which is what you have in the code 0x0F (base 16).

@kacunar

This comment has been minimized.

Copy link

kacunar commented Oct 27, 2017

@ccamacho yes I know. But when I run my code, I only get one measurement. why the accelerometer dont give me measurements with this frecuency??

@pimyride94

This comment has been minimized.

Copy link

pimyride94 commented Oct 27, 2017

@kacunar

This comment has been minimized.

Copy link

kacunar commented Oct 27, 2017

@pimyride94 ohhh ok, thank you. This is how i have the code now. But i have errors with the rate because the code is large. So when I want 10 seconds of measure with a sampling frecuency of 1 HZ , the raspberry give me 10 measurements but it takes more than 10 seconds.

@pimyride94

This comment has been minimized.

Copy link

pimyride94 commented Oct 28, 2017

@kacunar

This comment has been minimized.

Copy link

kacunar commented Oct 28, 2017

@pimyride94 thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.