Hi!
I am working on an IMU (inertial measurement unit) project that uses an accelerometer and gyroscope. I'm fairly early in the project and would simply like to read data from the accelerometer. In the datasheet, it recommended reading all data registers at once to avoid data changes between readings. Anyway, I am writing my own "readFrom" function to do this, but I get an error that says the following: (error: invalid conversion from 'byte*' to 'byte'). This occurs on the last line (54) where I try to return the "data" variable. (Code is attached to this post.)
Apparently it has something to do with pointers, but I don't know anything about them, or what they have to do with my code. I am following a more complex code to create my own, but I feel as if everything I've done is pretty straightforward.
Any help would be really appreciated. I've spent a lot of time just trying to get a valid output, and this seems to be the last hurdle.
Thank you very much!
code.ino (1.44 KB)