Basic Debug Commands (Spin)
codyspraker
Posts: 46
Hey guys, I don't want to waste anyone's time with such a basic topic but I have given a bit of time trying to find a basic way to cleanup the debug (FullDuplexSerialPlus) for my Propeller Spin Program. I am displaying data from multiple sensors onboard and they are not very clean without the basic ability to format like adding a new line. Am I just missing some of the basics or are these commands not present in the debug program? Thanks for the help guys
Comments
I guess you miss something there.
for a new line you simply transmit a CarriageReturn aka ascii 13
fds.tx(13) for example
there are also methods to call for outputting strings, hex and decimal numbers as Text to your serial Terminal
fds.dec(128) will output a to text converted number "128"
fds.hex(128) gives you "7F"
just look at the source of FullDuplexSerial.spin
In PropellerTool Software on the left side you find a dropdown. Select "Propeller Library". Then you see all the spin library files in the tree-view left side. Look for FullDuplexSerial.spin. Look at the source and you will find several PUB methods. There you find all what you need to format your output nicely...
Enjoy!
Mike
If you want to look at an example of how to use the formatting methods, I believe my QuickStart servo tester code uses them.