Delay for reading sensors or motor encoder


#1

Hello,

I’ve read in this subject : http://www.dexterindustries.com/topic/segway-with-brickpi-not/, that reading a sensor can take half a second with brickpi+. Is this true or i have misunderstood?

More generallyi am interesting to know the typical delay for reading a sensor and the speed for reading the motors encoders.

Thanks
ThHibaut


#2

Hey amare, it can take that long depending on the sensor, yes. This person wanted to get a very quick response though for implementing a segway.


#3

It is very long !! This time depends of the number of datum reads ?


#4

It might actually read quicker, I can’t find where I wrote that down in the documentation. But yes, you do need to leave at least 10 ms between reads to make sure you get a consistent data flow back and forth if you’re using Python or C.


#5

10ms it seems good with the I2C delay and the delay between Rpi and the board. It is better than 500ms !!