EzScrn - With Charts - simple PC / smartphone interface for your Arduino program

Robin2:
(Would you be prepared to wite an example?)

I'll give it some thought. I've not used the Arduino Stream class like that (I'm quite new to Arduino, but not to embedded programming in general) but I have done plenty of Polymorphism in the past (which is the buzz-word for this technique.)

As an example, I picture a function that does a set of stream I/O (like your example screen code in the first post) using a Stream object that is passed in as a parameter. Then, call that function using Serial, a YunClient connection, and a Process object. I would think that should prove the point on the sketch side.

You have not mentioned whether what you have in mind will also work unchanged on a Windows PC?

The core Python code should work just fine unchanged. I don't have enough experience with Python on Windows to know if the low-level wrapper for the serial port will work without changing (but if the serial port code works now on Windows, there's no reason it shouldn't work as a wrapper.) Stream redirection and pipes have been a part of MS-DOS since the PC came out, and the functionality is there just like it would be in just about any operating system.

It has the HUGE advantage over an RPI that out-of-the-box you don't need a TV (which I don't own) to see its output, you an just use SSH and an existing laptop.

Of course, you can also use SSH and a laptop with an RPi, you don't have to use the video output.

The HUGE advantage I see that the Yun has over the RPi is the combination of on-board WiFi, and an integrated embedded microcontroller to handle real time I/O and processing. That's where I see the Yun's greatest strength: write an Arduino sketch to handle those parts that require low-level hardware I/O and hard real time control, and do the rest of the work (heavy computations, networking, storage, etc) on the Linux side. The limitation of the Raspberry Pi and Beagle Bone Black (and similar micro Linux systems) is that Linux is not real-time: therefore any hard real-time processing (things requiring microsecond level control, for example) don't work well in a non-deterministic operating system like Linux.

One of the real jewels in the Yun's crown is the ease of being able to do everything in a sketch, and the power of being able use the Linux side for the heavy lifting. You can divide up the task in many ways depending on your needs and abilities.