test speed of button
-
Hi,
I would like to test the speed of 2 buttons. i got a button connected to a usb encoder board , and the same button connected directly to the gpio of the raspberry pi 2. For my project i have to determine which button works faster.
Is it possible to find a log with the inputs? Or is there a way to test this? -
I have seen some threads talking about possible input lag and processing delays in the microsecond range but never any real measurements to back up the theory. Only anecdotal evidence of "Trust me there is totally a difference ... I can tell."
One challenge I think you will face in this test is; How will you measure when the button is pushed? In other words if there is a difference in time of when the switch of the button is pushed and the input is received, how will you measure or record the start time?
Additionally will you be measuring the physical variables like the distance the physical button we push has to travel and its ability to smoothly travel that distance or just the moment the circuit is closed by the activation of the switch, micro switch, what have you?
I don't want to rain on your parade, but I do want you to be able to make good accurate measurements.
Ooh idea...
First you will need someone to write you a script or something to give you a time stamp out put when a button is pushed.
Then you wire up one button to both a usb encouder and gpio. That would give you the same starting point and then you would just need to look at the difference if any in the time stamp....Oh I see looking back at your post you mentioned "same button". Okay so I'm no help. If you do get a script made I wonder how it might handle simultaneous inputs.
Would the time stamp be the same?
Is there an order of priority in the firmware?
Is the zebra white with black stripes or black with white stripes?
Does any of this really matter when micro second differences are overshadowed by tenth of a second differences in physical travel?
Is my #1 Dad mug meaningless because my son only has 1 dad to choose from?Okay the last one was fake. I don't have a #1 Dad mug...
Why don't I have a #1 Dad mug!?
Good luck with your tests.
(wonders off)
"Hey... Boy!. Why don't I have a #1 Dad mug!?..." -
You may be able to get some good ideas on how to test at the link below.
https://forums.libretro.com/t/an-input-lag-investigation/4407
I have seen some threads talking about possible input lag and processing delays in the microsecond range but never any real measurements to back up the theory. Only anecdotal evidence of "Trust me there is totally a difference ... I can tell."
That link is likely to be the most thorough you'll find on the subject. Brunnis really put the time into investigating and documenting many different scenarios.
-
@mediamogul , Thank you for the link. That is a well done study. The led/camera recording was a good way to measure the interval from button activation to action. I also like that Brunnis considered the various contributors to input lag in the processing of the emulators and writing to the screen.
-
-
@lurker that was the objective. not really how long the time is between a button clicked and received. but the delay time of the recorder in contrast to the button as GPIO. but if the delay time is so minuscule then you answered my question. its useless to compare. ty
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.