Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collect data using Python at a constant high sample rate #55

Open
Ardanoah opened this issue Oct 13, 2023 · 1 comment
Open

Collect data using Python at a constant high sample rate #55

Ardanoah opened this issue Oct 13, 2023 · 1 comment

Comments

@Ardanoah
Copy link

I'm working on a project using the Go direct® hand dynamometer and I'm trying to collect data at 50Hz. I called gdx.start(20) for this task but it seems like the sensor is sending packages containing multiple data points at a lower frequency(around 10Hz) to simulate a higher sample rate(50Hz) instead of sending data at a constant interval #1. There will be a slight delay between each package so the data is quite discontinuous with respect to time. Is there any way that allows me to just collect data at a constant rate, like 50Hz?

@sswartley
Copy link
Contributor

Hello,

The data are being collected by the sensor at a constant interval, as specified in gdx.start().

The Go Direct sensor performs continuous measurements at the specified period intervals and sends the resulting data to Python for display. Since we know the specified measurement period, we can manufacture timestamps for each measurement. The data are transferred in a measurement packet. If the period is slow enough, then the packet might only have a single data point. But at faster periods the packet needs to contain multiple data points.

You must also call gdx.read() fast enough to make sure you don't eventually lose data.

All the best,

Sam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants