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

why cold_start? #2

Open
AlekseyFedorovich opened this issue Oct 19, 2020 · 2 comments
Open

why cold_start? #2

AlekseyFedorovich opened this issue Oct 19, 2020 · 2 comments

Comments

@AlekseyFedorovich
Copy link

Hi,
I'm pretty new with SPI protocol. I'd like to know why you put that 'cold_start' execution in the init so basically everytime you instantiate the class.
Thank you!

@dzheng256
Copy link
Owner

been a while since i worked on this, but iirc the idea behind a cold start is to "warm up" the device by reading some initial data that you don't store, so that once you start storing the reads the measurements are more consistent. If you don't do the cold start you'll probably get less consistent measurements in the beginning. As for why it's in __init__, the idea was that you instantiate it once and read many times

@AlekseyFedorovich
Copy link
Author

AlekseyFedorovich commented Oct 21, 2020

Also another question please:
why you compare the register address with 0x40 while writing and with 0x40 and 0x80 while reading? is this a SPI convention? I couldn't find this on the ADXL345 datasheet
Thank you

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

No branches or pull requests

2 participants