SEROUT Command formatting
6sblackbelt
Posts: 5
in BASIC Stamp
Could someone please tell me th emeaniong of $08, $20 .... $OD
in SEROUT TX\CTS, Baud, [$08, $20, $00, $00, $00, $0B, $0D,
DEC2 Temperature1, ".", DEC1 Decimal1, ",", DEC2 Temperature2, ".", DEC1 Decimal2, ",",
DEC2 Temperature3, ".", DEC1 Decimal3, ",", DEC2 Temperature4, ".", DEC1 Decimal4, ",", $0D]
Temperature3, Decimal3, Temperature4 and Decimal4 are not coming out correctly
in SEROUT TX\CTS, Baud, [$08, $20, $00, $00, $00, $0B, $0D,
DEC2 Temperature1, ".", DEC1 Decimal1, ",", DEC2 Temperature2, ".", DEC1 Decimal2, ",",
DEC2 Temperature3, ".", DEC1 Decimal3, ",", DEC2 Temperature4, ".", DEC1 Decimal4, ",", $0D]
Temperature3, Decimal3, Temperature4 and Decimal4 are not coming out correctly
Comments
The hex characters are for controlling the output, and their functions may differ depending upon the output device being written to. Typically, $08 is a backspace, $20 a space, $00 a clear screen, $0D a carriage return.
What are you outputting to (e.g. DEBUG screen, LCD, etc.)? What are the values you're trying to print, and what does the output look like?
-Phil
Recently added the temperature3 & temperature4 to the datalogger
Changed $0B (hex value before $0D) to $15 and it worked - $0B=11 bytes and $15=21 bytes
Each tempeature value is 5 bytes which is in xx.x, (like 68.5, )
I was writing only 2 temps before and now 4 temps ==> 10 bytes to 20 bytes
still dont undertand the function of [$08, $20, $00, $00, $00, $0B, $0D
There are other commands that you must be using in the same program, such as $09 $20 "filename" $0D to open the file.