![]() |
Forum Index : Microcontroller and PC projects : Pipe functionality
Author | Message | ||||
panky![]() Guru ![]() Joined: 02/10/2012 Location: AustraliaPosts: 1114 |
Can anyone suggest a way in which I can 'pipe' the console output to a string variable? Eg. if I want to send the output of an OPTION LIST command to a variable? I know I can capture it with teraterm or similar but I would like to be able to do it internally in MMBasic. Doug. ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
vegipete![]() Guru ![]() Joined: 29/01/2013 Location: CanadaPosts: 1132 |
I was thinking similar. If we knew where the serial transmit buffer was in memory, we could peek into it immediately after "OPTION LIST" Visit Vegipete's *Mite Library for cool programs. |
||||
CircuitGizmos![]() Guru ![]() Joined: 08/09/2011 Location: United StatesPosts: 1427 |
That would be a really nice feature. Micromites and Maximites! - Beginning Maximite |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10310 |
Use MM.INFO(OPTION option). If any options that make sense are missing I'll add them |
||||
panky![]() Guru ![]() Joined: 02/10/2012 Location: AustraliaPosts: 1114 |
Thanks Peter, I was thinking of a more general usage. When I am developing a program, one of the tools I use to debug the program is to intersperse PRINT variable statements at strategic points so I can see what is going wrong ![]() This works fine when connected to a PC - the console output shows these as well as error messages without screwing up the graphics display. In a standalone situation however, this is hard to achieve (I have used the method where I create a log file and dump the progress/error statements into that but it is messy and time consuming). I was hoping there may be an easy method already available of diverting the console output to either a string/longstring or file for analysis on a temporary basis - a bit like TRACE ON/TRACE OFF (and, in fact this would allow TRACE ON output to be collected for analysis). Thanks for a great program and all the support you give, Doug. ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
MustardMan![]() Senior Member ![]() Joined: 30/08/2019 Location: AustraliaPosts: 175 |
A few weeks ago I came across this video (about 20 minutes long) while looking for something else: Realtime debugging using serial decode Although I've been doing embedded for more than two decades, it talks about an idea that I'd never even thought of: how to extract data from an embedded system without having to resort to pushing stuff to a console. Sure, the data might not be as convenient as a nicely formatted string on a terminal emulator, but you can get the data out real-time if need be, and for debugging that can be a life saver. I really don't like pushing videos, but this one was a real gem! Cheers, Edited 2020-11-19 13:33 by MustardMan |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |