Data rate implementation
Posted: Sat Oct 14, 2017 11:07 am
Greetings,
I have an doubt about the data rate implementation. It's my duty as a programmer to make my program wait the time defined by the data rate to update a new value or can I leave this task for the internal phidget's implementation?
I'm working with an Phidget Spatial 1056. I need to get all 3 axis accelerometer and gyroscope values. Summarizing, in pseudo code, this is my doubt:
in the example below I'm working with only one axis
a)
while(true)
{
getAccelerometerValue('axis_0');
getGyroscopeValue('axis_0');
wait(8000); //working with the deafult value 8ms
}
b)
while(true)
{
getAccelerometerValue('axis_0');
getGyroscopeValue('axis_0');
}
which of the options is true?
Thanks!
I have an doubt about the data rate implementation. It's my duty as a programmer to make my program wait the time defined by the data rate to update a new value or can I leave this task for the internal phidget's implementation?
I'm working with an Phidget Spatial 1056. I need to get all 3 axis accelerometer and gyroscope values. Summarizing, in pseudo code, this is my doubt:
in the example below I'm working with only one axis
a)
while(true)
{
getAccelerometerValue('axis_0');
getGyroscopeValue('axis_0');
wait(8000); //working with the deafult value 8ms
}
b)
while(true)
{
getAccelerometerValue('axis_0');
getGyroscopeValue('axis_0');
}
which of the options is true?
Thanks!