Go to advanced search

by Ankit9148
Fri May 17, 2019 2:53 pm
Forum: Troubleshooting
Topic: Why Raspberry pi is storing different number of samples different second?
Replies: 13
Views: 415

Re: Why Raspberry pi is storing different number of samples different second?

You have to read more carefully. read sample + store sample + print sample + sleep 0.01 seconds will only do 100 samples per second if read/store/print each take no time. They each take some time. You need to factor in that processing time. Yes, I understand that. But why the number of samples are ...
by Ankit9148
Fri May 17, 2019 2:24 pm
Forum: Troubleshooting
Topic: Why Raspberry pi is storing different number of samples different second?
Replies: 13
Views: 415

Re: Why Raspberry pi is storing different number of samples different second?

According to your comment, it should be okay if I take time.sleep(1/100). But its not still capturing 100 samples per second. Its like sometimes 70, sometimes 80. The TimingA I am taking is 1 second to understand the output number of samples clearly.
Thank you for your suggestions anyway.
by Ankit9148
Fri May 17, 2019 1:47 pm
Forum: Troubleshooting
Topic: Why Raspberry pi is storing different number of samples different second?
Replies: 13
Views: 415

Re: Why Raspberry pi is storing different number of samples different second?

Thanks for the reply. I am using Pi 3 B+ with an accelerometer adafruit MMA8451. The language I am using is python. This is the particulart coding portion where my pi is capturing data from accelerometer and writing it to a csv file. while True: x, y, z = sensor.acceleration time_now = datetime.date...
by Ankit9148
Fri May 17, 2019 8:37 am
Forum: Troubleshooting
Topic: Why Raspberry pi is storing different number of samples different second?
Replies: 13
Views: 415

Why Raspberry pi is storing different number of samples different second?

Hello guys, I am trying to take vibration data using an accelerometer. I didn't connect any ADC. The accelerometer is taking data at a rate of 400Hz but my pi is stoing it at a different rate. For example, in one seocnd its 250 samples the next second its 270. This is a big problem as I want to have...

Go to advanced search