Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Is there a reason you need to update it 400 times a second? All of the code takes time. It takes ~0.2 ms just to send the 8bytes at 250k, then you have to process the data. I would suspect that all that is taking longer then 2.5 ms and so by the time you read again, you have more then 8 bytes in the buffer, and eventually it overflows. I would try decreasing from 25ms to 24 and re-test, then reducing again. you may be able to find the lower limit of what will work reliably. This is assuming there is a need for it to update faster then 40 times a second, if not then just stay at 25ms. Commented Jun 3, 2019 at 16:45
  • @ChadG Actually i wanna apply control theory about multirate sampling time, and i just realize i made a mistake.. i didnt need to make it 2.5ms now. And thank you for explaining why my robot couldn't respond.. could u put ur answer at answer section, because u explain why my robot not responding. Thx Commented Jun 4, 2019 at 3:36