Im using arduino to sample An emg signal however im getting the sample rate about 600hz using ESP32 thus, how can i increase the sampling rate to 1000HZ
here is the code i manged to get 600hz
Change the code, the sensor, or both.
For a more detailed answer, post the project details. For hints, see the "How to get the best out of the forum" post.
does the sensor affect on the sampling frequency?
What sensor? What code?
myoware emg sensor . For your info some peploe manged to sample the signal at 1000HZ but i dont know how they did that
remove of delay(1) and Serial.print,,,
Consider using a datalogger such as SdFat or "High Frequency, Long Duration Datalogging
with remote control via Teensy3.2 and SD Card"
then process your data offline. YMMV
how to remove the serial print
Use a low latency data logger to record your code. This may give you the sample rate you require.
Then post process the recorded data and display it. You don't have to worry about speed at that time.
Im using edge impuse to save my data .Actually im recoreding 5s data each time and the sample rate must be 1000HZ which will result 5000 sample points
Congratulations! What's the problem?
isnt i said i got 600hz insted of 1000hz?
I understand that you are only getting 600hz.
I further understand you are recording data via edge impulse.
From your code I also see you have a delay() and a Serial.print, both of which are likely contributing to the current low responsiveness of your current configuration.
If you want something you don't have, you are going to have to do something you're not currently doing.
go back and lock at my code you will find the delay is not included in the code
Can you show what is being printed out by this line ..
oh I cant copy it - because you have posted your code as a photo.
Can you post it as code? In the IDE "copy for forum" and post using the code tags.
And a print out of the Serial.println output?
@johnerrington
testt.ino (402 Bytes)
actually managed to get 1000 HZ when I assign the variable as int but when I change it to float it decreases back i don't know the reason
What processor are you using?
At 115200 Baud rate, Serial.print() takes 1 millisecond to print 11 characters.
That is all you can do at 1000 Hz -- no time to collect data.
intel
well , you still did not ans my question
Serial.println(String(millivolt1000) + ',' + String(millivolt11000));