Beginner:: Logging Data from Transmitt window of Serial Terminal
oodes
Posts: 131
Hello guys
I'm a newcomer to the world of Spin and Parallex and I have limited knowledge but I wonder could you's point me in the right direction. I wanna capture data that I randomly type into the Transmit Bar on the Serial terminal and write it to a text file that I will save on a Sd card. I have looked at the example file EnterAndDisplayValues.spin but im looking to save the characters (they dont have to be converted into hex or binary just junk characters to show the functionality of it)
Cheers in advance
Des
I'm a newcomer to the world of Spin and Parallex and I have limited knowledge but I wonder could you's point me in the right direction. I wanna capture data that I randomly type into the Transmit Bar on the Serial terminal and write it to a text file that I will save on a Sd card. I have looked at the example file EnterAndDisplayValues.spin but im looking to save the characters (they dont have to be converted into hex or binary just junk characters to show the functionality of it)
Cheers in advance
Des
Comments
1) You need to look at the various methods (subroutines) in FullDuplexSerialPlus (or any other serial I/O object that you care to use). In addition to the .getDec method, there are others that input characters into a buffer and process them into numeric values. There's a .getStr method that inputs a line of text (terminated by a Return character) into a byte array you supply. You can also use .rx directly which supplies one character at a time.
2) Look at either Kye's SD Card Object or FSRW 2.6. The former is better documented and more detailed. The latter is smaller and more commonly used. Both have methods for creating files and for writing single bytes to them or strings of bytes. It's simple to add methods (from other objects like FullDuplexSerialPlus) to handle numeric values if that's what you want.
Thanks in advance.
DEs