Response times


#1

When looking at the response times of some sensors I realized, that they have a signifcant delay.
E.g. the tilt: when climbing a hill a my codey rocky was showing on the display the value of the sensor.
It took him sometimes more the 5 seconds to change the value from the original one.
And what warried me even more - the change is not gradually.

The same happened with the value of the potentiometer.

Therefore these sensors are hardly useable for realtime reactions of the codey.

Does anybody have the same experience?


#2

Hi zstaszewski,

I looked on my side and the responsive sensor for moderately fast movement. Maybe your world has a small angle. Do you have your code ??
err


#3

Thanks.

I write the code in Polish, so the commands are:
When Button A is pressed
Do forever
show the value of the “tilt” sensor

blocks


#4

Hi staszewski,

You’re right, the code reaction isn’t great. I would have thought that the Codey Codey would have a better balanced “thread”. In fact, maybe it’s perfect as a “thread” but I don’t understand them well enough.

So, use your loop in the main “thread”.
Anglais

Be careful, there are blocking instructions like this
blo

Conclusion: The sensor is reactive it depends on the programming. There is certainly a way to do your code with this instruction, but I don’t have time to search.
btn

Hope this helps a bit.


#5

Thanks a lot.

In fact I first tried with parallel tasks (now in english :slight_smile:)
In order to display the pich angle while climbing.

Than I thought codey would not be able to process two tasks in palrallel and deleted the “moving forward” taks.
So I took the Codey in my hand and started to move it. Same delay occured.
Anyway it seams that I need to buy a mbot neo.
Do you recommend it?
Are the motors and sensors accurate?

blocks1blocks2


#6

Hi zstaszewski,

Be careful, I talked about precise motors and not the gyroscope.

Unfortunately, I do not have access to the mBot Neo and when I get it, I will test all the sensors so much that it will bleed from the eyes;)

Leave me 1-2 days, I will prepare a little better code for you.


#7

Hi zstaszewski,

I took a few minutes to make you a funny code. You can see that there is flickering on the screen because of the instructions I am using. In Python I do the same but it is possible to fix the flickering by producing a single image.

I keep saying the sensor is responsive … it all depends on the code


#8

Thanks a lot!
The response time is excellent now. Almost real time.

Good work!


#9

I finally found out, where my mistake was.

When in send-mode the response times are excellent.
When switching to live-mode the response times are unacceptable.

:slight_smile:


#10

Interesting. I’ve been watching this thread and i was going to ask that at one point. When in live mode, the communications between Codey and your computer does slow things down. I should have asked!


#11

Nooooooo…

I’m so over it that I didn’t ask the question at the start of the post. This is an explanation of Makeblock recall often.

Sorry zstaszewski …