Hey guys,
I need help displaying data from a depth sensor in a single line. By default, the depth sensor writes out three different lines of values ( $SDMTW, $SDDBT, $SDDPT)each on a single line( pls see image attached) every time its reading data. I'm trying to change the output so that each of those three values would be on a single line like so:
$SDMTW, 31.4, C02 - $SDDBT, 1.8, F,0.5,M, 0.2, F08 - $SDDPT,0.5,7C
$SDMTW, 31.4, C02 - $SDDBT, 1.8, F,0.5,M, 0.2, F08 - $SDDPT,0.5,7C
$SDMTW, 31.4, C02 - $SDDBT, 1.8, F,0.5,M, 0.2, F08 - $SDDPT,0.5,*7C
ETC.
Any ideas on how i can achieve this ? Thanks a lot you guys.
The code below is what i used the generate the image attached .
#include <SoftwareSerial.h>
SoftwareSerial depthSerial = SoftwareSerial(8,7,true);
void setup() {
Serial.begin(9600);
depthSerial.begin(4800);
}
void loop (){
if (depthSerial.available()>0) {
Serial.write(depthSerial.read());
}
}