ECG Module code
-
Please help me understand your code for this module
I got this module to work on a m5stack Fire but I would like an explanation of the library program, ECG.ino at:
https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Module/ECGThere are no comments in the code which makes it hard to follow the program.
There is also no data dictionary for the following terms:
measurements
ECG_IDLE
ECG_DATA_LENGTH
ECG_DATA_H
ECG_DATA_L
ECG_ENDparameters:
ECGdataFSM
ECGWritePoint
ECGReadPoint
ECGData
DataMAX
DataMINDifficult to understand constructs
What does the following do?ECGdataFSM = ( data == 0xAA ) ? ECG_DATA_LENGTH : ECG_IDLE;
DataMAX = ( ECGData > DataMAX ) ? ECGData : DataMAX;
DataMIN = ( ECGData < DataMIN ) ? ECGData : DataMIN;The documentation for this product at https://docs.m5stack.com/#/en/module/ecg?id=related-link
states that the MPU STM32 in the module supports a heart rate statistics algorithm. What does this algorithm do? What parameters does it use? -
@dsrc12: I have now got this to work and it works best if I discount the USB link to Fire. The code I had difficult understanding is based on a C++ Ternary Operator in C. Returns either ECG_Data_LENGTH if data equals 0xAA or ECG_IDLE if false. At least this is a start. Still need to decode the meaning of the parameters.
-
It is very shame that the product is not accompanied with any documentation.
Where is the detailed schematic?
Where is the description of the FW?
Where is the description of RawDisplay SW?
Where is description of the passthrough serial?
Where is protocol description?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login