You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having problems with eegScope.py. Running it with a test signal from a function generator, the correct frequency and waveform is shown. The scroll rate of the raw signal is however only half the speed of the expected. i.e. when 2 seconds have elapsed, the graph has only scrolled 1 second (going by the markings on the graph). This results in the data on the screen being delayed compared to the current signal, with this delay accumulating over time. The FFT plot follows the raw data, i.e. it's also delayed.
I've tried changing 'Fs' in the and other parameters in the Python program, but it either doesn't help or breaks the code. I've also tried with different sample rates on the microcontroller. I've verified that the microcontroller sends data at the correct rate and that the packets are up-to-date.
Thinking it could be a problem with precessing time, I also tried removing the FFT plot and all the FFT calculations, but the result was the same.
The text was updated successfully, but these errors were encountered:
After tinkering a bit more and pulling out a few hairs, I finally found the issue. It's the PySerial module that simply couldn't keep up. Timed how long it took to receive 5000 samples at a 500 Sa/s rate, and it came out to approx 15 seconds, while it should have been 10. I guess the data was put in some buffer "under the hood", which is how I was able to see tens of seconds old data.
Worked around the issue by lowering the sample rate all the way to 250 Sa/s, which should still be sufficient, given the low frequencies of the EEG signals.
It's a bit strange though, given you were able to run it at 1000 Sa/s.
I'm having problems with eegScope.py. Running it with a test signal from a function generator, the correct frequency and waveform is shown. The scroll rate of the raw signal is however only half the speed of the expected. i.e. when 2 seconds have elapsed, the graph has only scrolled 1 second (going by the markings on the graph). This results in the data on the screen being delayed compared to the current signal, with this delay accumulating over time. The FFT plot follows the raw data, i.e. it's also delayed.
I've tried changing 'Fs' in the and other parameters in the Python program, but it either doesn't help or breaks the code. I've also tried with different sample rates on the microcontroller. I've verified that the microcontroller sends data at the correct rate and that the packets are up-to-date.
Thinking it could be a problem with precessing time, I also tried removing the FFT plot and all the FFT calculations, but the result was the same.
The text was updated successfully, but these errors were encountered: