This has had me stumped for months. No matter what I did, I could not read the data registers. The 355 is a very sensitive accelerometer and has been around for years. Lots of support ending with 'I got it solved', and no hint as to what finally did it.
Now, in an exclusive to this paper, we divulge the secret, rendered down the simplest.
On your rp5, you set up the I2c. This is all over the place. Then do i2cdetect -y 1 and you get the famous 1d signal. You are hooked up, and you can read and write all the registers, but the data registers are all zero.
Reset the darn thing for fun
i2cset -y 1 0x1d 0x2f 0x52
i2cset and i2cget are simplest thing to do for 12c. No use going to python if you can't get this working. Manths and months!
Now, you have to superstitiously and religiously do these 3 lines in sequence.
i2cset -y 1 0x1d 0x2d 0x00
i2cset -y 1 0x1d 0x2c 0x00
i2cset -y 1 0x1d 0x28 0x00
These are the stinking default values! You wouldn't think. But you have to do it.
henv) harold@rasp5:~ $ i2cget -y 1 0x1d 0x09
0xc4
2 comments:
Quite possibly the most "interesting" post in the history of the internet. Grin.
I know, better than a fusion or battery improvement.
Post a Comment