Dear Dexter company!
We bought your compass sensor and I have problem with compiling driver for it. I use driver for nxc, problem is at line 91.
Sorry looks like html doesn’t work. Anyways, I need answer really quick since we are leaving to brazil worlds in 10 days.
here is the picture url, I hope you can see it.
p.s. ignore task main error, it’s not shown when I try to run example.
DeeCoy, I tried to replicate the problem and saw the same error. Can you paste this into line 91:
// ORGINALLY int offset[] = {x_offset, y_offset, z_offset};
int offset[] = {0, 0, 0};
offset[0] = x_offset;
offset[1] = y_offset;
offset[2] = z_offset;
That compiles, and I think it should work. Let me know if it works for you and we’ll update the code example on our website. Thanks!
I’ve already done that and it works, you can use this:int offset[]; offset[0] = x_offset; offset[1] = y_offset; offset[2] = z_offset;
But there is another problem. Sensor is very unaccurate, it is actually useless. It is on very long cable, away from any other devices and 180 degrees is still not 180 degrees.
Is it being held flat? Does it return a full 360 degree return on rotation?