Philip Verspreeuwen
01-30-2007, 02:30 AM
Hello,
I have the next problem:
I'm using a gyroscope and accelerometer input. Both are a pulse width modulation signal. To see the actual difference, I substract the read value of the reference value (which is the neutral signal for both sensors). This has as result that when the sensors are turned one way, I become a value between 0 and 575. When turned the other way I get a value between 0 and -575. When using this negative value in a calculation, the BS2px sees this value as a positive value much higher then the actual value... Can anybody tell me which kind af variable I need to use? For the moment I'm using a "word", but apparently this is only able to have a positive value.
thanks,
Philip
I have the next problem:
I'm using a gyroscope and accelerometer input. Both are a pulse width modulation signal. To see the actual difference, I substract the read value of the reference value (which is the neutral signal for both sensors). This has as result that when the sensors are turned one way, I become a value between 0 and 575. When turned the other way I get a value between 0 and -575. When using this negative value in a calculation, the BS2px sees this value as a positive value much higher then the actual value... Can anybody tell me which kind af variable I need to use? For the moment I'm using a "word", but apparently this is only able to have a positive value.
thanks,
Philip