Reply To: Preparations for GyroBot

HomeForumsMonoBrick EV3 FirmwarePreparations for GyroBotReply To: Preparations for GyroBot

#3921
Author Image
Anders Søborg
Keymaster

Hi Jacek

There are a few things that I have noticed about your code.

You are using decimals – why? I can’t tell for sure but on this hardware it might not be the best approach if you want fast calculations.

You are using a thread.sleep in your control loop – On Windows the minimum sleep time is something like 20-30 ms – what it is on the EV3′s ARM processor I am not aware off but you could do some measurements to find out. But Thread.Sleep is not guaranteed to sleep for exactly the specified amount of time. That leads me to the next question.” What performance are you getting”? Are your control loop running a a constant rate? Is it running at the rate you except? All the constants what you have are not correct if you run with a different sample time that the “original” LAB view program

Anders

Posted in

Make a donation