Pages: [1] 2 3 ... 7   Go Down
Author Topic: Enhanced Serial Monitor (11 Visulisers, sample code) - DOWNLOAD available  (Read 17548 times)
0 Members and 2 Guests are viewing this topic.
UK
Offline Offline
Full Member
***
Karma: 13
Posts: 241
pt
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Add a note here or message me for a download link
Also visit Instructableshttp://www.instructables.com/id/Arduino-Development-Tool/


What a pain developing a new program for monitoring the serial output has been...http://forum.arduino.cc/index.php?topic=185085.0  but now through the speed and lock up issues (I hope). Growing up with 'spawn' and semaphores for multi threading under OS/2 didn't really qualify me for dealing with the .NET mindset. Hey ho its all done now. I really wonder what is going on at Microsoft - they seem to have made everything so complicated, pity IBM weren't as commercially savvy as their systems were at least elegant.

Now I have useful little serial monitor that I can use with the ability to do pause and restart the display, copy output to another window for review, restart the Arduino, beep to alert the user and control it all from the Arduino if I want.

So, for an example, you could be wanting to review 100 'records' but don't know when they may come but the Arduino sketch does. You get the Arduino to clear the display when the interesting event happens, record the 100 interesting records, have the Arduino switch off the monitoring, copy the records to the editing window and beep the user so you know something has happened... and then get back to work.

I'm now on to the bits I really need which is to graphically plot data from an IMU and record a Playstation controller's output. However you might find the basic text version a useful addition to your toolbox so I've attached the EXE (Windwoes only).

Please comment for bugs or improvements or if you just like it.

Cheers Alan

* Contact.txt (0.11 KB - downloaded 171 times.)
« Last Edit: July 15, 2014, 03:28:19 pm by acboother » Logged

sig

UK
Offline Offline
Full Member
***
Karma: 13
Posts: 241
pt
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What great fun the Arduino is but...
The IDE serial monitor just isn’t sophisticated enough for my liking. I found it difficult to get a mass of information displayed meaningfully. The monitor whizzed past and intermixing different types of information just made the display a muddle of text.
I output my IMU data to a Processing sketch which was very informative but was prettier than I needed and I found myself struggling to add more output styles especially when I wanted them to be running concurrently.
So I wrote my own serial monitor I was wondering if others would be interested in it. I’ll show/describe it below and would be interested to know people’s thoughts. If there is sufficient interest I will look into making it available.
It’s been tested on an Arduino UNO, Mega256, Nano and Pro Mini (all clones) and also on self builds using the ATMega328 with a CP2102. It was interesting to discover that the UNO and Mega do not work reliably at 300 baud and the buffering of data between them and the PC is also different. These differences are not noticeable in ‘normal’ conditions but show up at the limit of performance such as when transmitting a lot of data very quickly, in either direction, especially at the lower or higher baud rates.
I also wanted to integrate data being sent out to the Arduino into the trace so I could observe how long and how much data can flow before it is received and replied to.
The program runs on Windows and has the following window forms:
•   Main monitor
•   Message sender
•   Trace copy
•   LCD emulator
•   Freeform drawing surface
•   Alert reporter with  ability to run external programs
•   PS3 controller visualiser
•   XY scatter plotter
•   Sweep plotter
•   Histogram plotter
•   IMU visualiser
These can be controlled and configured from the PC and/or from the Arduino. To make the above forms respond to the data stream a simple protocol is used with commands identified with a # prefix and parameters separated by a ~ character. Free text is supported for viewing in the main monitor. All window forms have a quick button back to the main monitor window, a clear/reset button, a pause option, tracer text for that particular window form and a test button to try out commands directly as if sent via the serial port.
I adopted text representations rather than binary so it is possible to ‘see’ what is going on in the Arduino IDE’s serial monitor which aids development speed. It may not be as compact or fast as binary (which could be made more data efficient) but its convenience outweighs this benefit and the typical PC is well able to cope - it is possible to have all of the above forms being updated simultaneously from an Arduino running 19200 baud.
Logged

sig

UK
Offline Offline
Full Member
***
Karma: 13
Posts: 241
pt
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset




Main monitor window
•   This allows selecting, refreshing, opening and closing the COM port.
•   Choose a reading strategy - fast read normally and one line at a time where more control over the sequencing of messages to and from is important.
•   Control the display - pausing, clearing and copying the trace, adding in a timestamp which also shows whether the data flow is inbound, outbound or looped back (for test purposes where the serial device does not need to be connected).
•   Choosing a display refresh rate to optimise the loading on the PC when large quantities of data are being transmitted. Whilst reading the trace at high speed is difficult it is useful for the real time visualisers such as the IMU.
•   Read and display buffer usage is displayed to allow tuning and warn of either the PC or the Arduino generating too much data for the other.
•   It is used to manually open the other forms if not opened automatically by the Arduino.
Logged

sig

UK
Offline Offline
Full Member
***
Karma: 13
Posts: 241
pt
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset



Message Sender
•   This allows data to be sent outbound on the COM port and controls whether the output is included in the trace window.
•   Control whether the output is not sent out but simply looped back. This is used for convenient experiments with data streams to see how they work with the various forms and visualisers.
•   A looping tool allows multiple parameter substitution and repeats.
•   A joypad simulation with user adjustable data.
•   A keypad simulation with user adjustable data.
Logged

sig

UK
Offline Offline
Full Member
***
Karma: 13
Posts: 241
pt
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset




Trace copy
•   This allows you to review the trace output while the main trace window is running.
•   This contains the text of the trace window when requested for by either the user or the Arduino.
Logged

sig

UK
Offline Offline
Full Member
***
Karma: 13
Posts: 241
pt
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset



LCD emulator
•   80 columns by 25 rows.
•   Write text anywhere on the ‘screen’ in any of 7 colours for foreground and background.
•   Scroll command to you can treat it like a TTY display.
•   Make up your own user interface.
Logged

sig

UK
Offline Offline
Full Member
***
Karma: 13
Posts: 241
pt
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset



Freeform drawing surface
•   500 pixels by 500 pixels drawing surface.
•   Commands for line, rectangle ellipse, arc and pie, filled and unfilled, cross and text, in various sizes and orientations and in 5 colours.
•   For example plot out your robot path.
Logged

sig

UK
Offline Offline
Full Member
***
Karma: 13
Posts: 241
pt
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset



Alert reporter with the ability to run external programs
•   Somewhere to report special events to the user.
•   Option to send run commands to start programs.
Logged

sig

UK
Offline Offline
Full Member
***
Karma: 13
Posts: 241
pt
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset




PS3 controller visualiser
•   Displays PS3 or similar controller button and joystick values.
•   Green shows values unchanged since last reading.
•   Orange shows values that have changed since last reading.
•   Red shows values that are at maximum.
•   Joystick position cross hairs.
•   Useful for watching what the controller is sending to your robot for example.
•   See how sensitive the different buttons are.
•   Note if the joysticks are not self centring or minimum/maximum values not reached.
Logged

sig

UK
Offline Offline
Full Member
***
Karma: 13
Posts: 241
pt
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset



XY scatter plotter
•   See the relationship between two values for up to five different sets.
•   Easy user control of axis settings.
Logged

sig

UK
Offline Offline
Full Member
***
Karma: 13
Posts: 241
pt
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset



Sweep plotter
•   Trace like oscilloscope.
•   Five traces with a resolution between 10 and 1000 points.
•   Easy user control of axis settings.
•   For example watch accelerometer and gyro readings.
Logged

sig

UK
Offline Offline
Full Member
***
Karma: 13
Posts: 241
pt
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset



Histogram plotter
•   21 bar histogram.
•   Shows percentage of observations and count of observations.
•   Easy user control of axis settings.
•   Over and under range outlier recording.
•   Simple statistics - mean, min and max of within range observations.
Logged

sig

UK
Offline Offline
Full Member
***
Karma: 13
Posts: 241
pt
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset



IMU visualiser
•   Roll and pitch visualisation.
•   Invert option to suit installed orientation of breakout board.
•   Accelerometer and gyroscope readings (including gyro drift summation)
Logged

sig

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

wow!

2 questions came up:
Can I save the plots made as JPG, (or better as csv file and rerun ?)
support for VT100 emulator?

Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

UK
Offline Offline
Full Member
***
Karma: 13
Posts: 241
pt
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

20+years since I did a VT100 emulator.... I think not  smiley-eek

I'll add print and save to the wish list - good ideas
Logged

sig

Pages: [1] 2 3 ... 7   Go Up
Jump to: