Noob: Can't read from sensor
Posted: 22 Dec 2010, 01:02
Hi Folks,
Please forgive the noob-ness of this question.
I drive linux and have just managed to install the NXC firmware (128) and use nexttool to /COM=usb -download=showgyro.rxe ... the source for which is:
task main() {
unsigned int gyro = 5555;
repeat(100) {
gyro = SensorRaw(S1);
NumOut(0, 0, gyro);
Wait(1000);
}
}
I only see "0" on the screen ... ie: the SensorRaw(S1) is apparently only ever returning 0.
I have the HiTechnic gyro plugged into my brick's port #1.
I'm hoping this is easy for someone who knows what they're doing to spot.
Thanks in advance,
tc.
Please forgive the noob-ness of this question.
I drive linux and have just managed to install the NXC firmware (128) and use nexttool to /COM=usb -download=showgyro.rxe ... the source for which is:
task main() {
unsigned int gyro = 5555;
repeat(100) {
gyro = SensorRaw(S1);
NumOut(0, 0, gyro);
Wait(1000);
}
}
I only see "0" on the screen ... ie: the SensorRaw(S1) is apparently only ever returning 0.
I have the HiTechnic gyro plugged into my brick's port #1.
I'm hoping this is easy for someone who knows what they're doing to spot.
Thanks in advance,
tc.