0

Currently working with ADS1292rShield library. Is there any way to read the value of the respiration and heart rate without using the Protocentral GUI. Printing DataPacketHeader to the console just results in corrupted ASCII.

DataPacketHeader[9] = s32DaqVals[0];            // 4 bytes Respiration data
DataPacketHeader[10] = s32DaqVals[0]>>8;
DataPacketHeader[11] = s32DaqVals[0]>>16;
DataPacketHeader[12] = s32DaqVals[0]>>24; 

    for(i=0; i<15; i++) 
    {
      Serial.write(i);
      Serial.write(DataPacketHeader[i]);     // transmit the data over USB
    } 

Here is the output below of the Arduino serial monitor, is there any way to make sense of the data or how it is converted to a readable integer on the GUI?

⸮ < 0 p s | ` r I @ @ 9     ⸮ ⸮ ⸮ ⸮ ⸮ ⸮ ⸮ ⸮ ⸮ ⸮ ⸮ ⸮ < 2 $ & O ` q ` 8 0 ! > ⸮ ⸮ ⸮ ⸮ ⸮  ! 8 ! | H a @  9 $  ! ⸮ 8 B x  ⸮ ⸮ ⸮ ⸮  y a ` p  f ⸮ ⸮ ⸮ ⸮ ⸮ 1 b N p ⸮ ⸮ ⸮ ⸮ ⸮ ⸮ ⸮ ⸮ " D ` ` ` p  
 ! ⸮ ⸮ ⸮ ⸮ ⸮ ⸮ ⸮ ⸮ ⸮ ⸮ ⸮ ⸮ ⸮ ⸮ ⸮ ⸮ 0 ⸮ ' # 3 @ O ` D B @ @ ! ⸮ ⸮ ⸮ ⸮ ⸮ 0    a F ⸮ ⸮ ⸮ ⸮ ⸮ ⸮ " x p $ 0 ⸮ 

enter image description here

  • examine the four bytes as a 32 bit number – jsotola Apr 28 at 1:35
  • @jsotola I don't think the printout is corrupted because it is displaying valid data when the USB serial data is sent to the Protocentral GUI. I will try to group together the 4 bytes as a 32 bit integer. – Desert Digital Apr 28 at 3:22
  • the GUI is created using processing .... processing.org ... you can examine the sketch code and you can even rewrite the code for your own use – jsotola Apr 28 at 4:10
  • You are not printing the data, you are writing it. That is a difference. The packet format is binary, so you cannot get human readable data by writing. And jsotola is probably right. The data most likely consists of a 4 byte value. – chrisl Apr 28 at 7:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.