EmotiBit / EmotiBit_FeatherWing

Firmware to run Emotibit with Adafruit feather M0 WiFi and Feather ESP32
MIT License
19 stars 8 forks source link

PPG at 1000Hz #287

Open git-aniket opened 9 months ago

git-aniket commented 9 months ago

PPG at 1000Hz implementation Hi, firstly thank you so much for this open-source repo. I was working on making some changes to the code, to get PPG at 1000Hz for my Emotibit Feather M0 board and followed the tips given in the link: https://www.reddit.com/r/EmotiBit/comments/11xmdm9/can_the_sampling_rate_of_the_signal_channels_be/

My solution I made changes at three points in the code (change buffer size, disable averaging) as shown in the commit just to get PPG at speeds higher than 100Hz.

f09d2f211ae82b6e74c3e3916e5742c89de822a7

I also tried to disabling the averaging for PPG, changing the ISR frequency and increased the buffer size, as shown in this commit :- this one is a bit messy because of there are different tab sizes used but changes have been made majorly to Emotibit.h. Lines 137:145, line 321:330 and Lines 600:601 as per recommendations made in the above mentioned reddit. link.

d59a8ad882cd95ea90820461a3e833585b1e441c

However, these changes don't seem to alter the sampling rate or the data sending rate beyond 100Hz.

Could you please suggest me where I may be going wrong.

All I want is PPG at 1000 Hz, (which I think should be possible given the sensor data sheet says so, and availability of ample RAM), while other sensor rates can remain the same.

I plan to make generate a pull request once this works.

Once again, thanks for your amazing work.

Regards Aniket