We use cookies to provide our visitors with an optimal site experience. View our privacy notice and cookie notice to learn more about how we use cookies and how to manage your settings. By proceeding on our website you consent to the use of cookies.
contains a Digital Compass Example.
@(Copy the following program to your Arduino IDE:).
The code does not compile. The section of code >
// Apply soft-iron scaling
for (uint8_t i = 0; i < 3; i ) {
mag_data[i] = (soft_iron[i][0] * hi_cal[0])
(soft_iron[i][1] * hi_cal[1])
(soft_iron[i][2] * hi_cal[2]);
}
Compass_Demo:107:47: error: expression cannot be used as a function
(soft_iron[i][1] * hi_cal[1])
^
Has this been updated, or is there a fix?
I know this is quite a while ago!
Thank you.
Thanks for your reply.
The missing are commas; as soon as I saw your ()()() I realised they should be (), (), (); then it compiles!
The i only needs to be 0, 1, 2 and not 3 as well. X, Y, Z are the three planes.
It is never easy debugging code you believed to be functional!
Thanks again
Vaughn