Serial.println("<+newScrn, size=40x30, tleft=0x0, bg=green, fg=black>");Serial.println("<+tOut, name=outA, size=38x10, tleft=1x1, bg=yellow, fg=black>");Serial.println("<+btn, name=ledA, size=8x3, tleft=10x12, bg=black, fg=orange>");Serial.println("<+slid, name=slidA, size=15x1, tleft=2x16, range=30x150x90x10>");Serial.println("<+tOut, name=outB, size=38x2, tleft=1x18, bg=yellow, fg=black>");Serial.println("<+quit, name=Quit, size=8x2, tleft=30x25, bg=red, fg=black>");Serial.println("<+endScrn>");
The reason I have disabled the Bridge capability is that I wanted to explore whether identical code can run on a Yun and on a PC. The first thing the code does is get a list of the serial ports so the user can select the appropriate one. The Python code is entirely unchanged for the Yun apart from telling it that it is using a Yun so it can use the correct 32u4 reset process.
As far as I can see the out-of-the-box concept for the Yun is that the Arduino is dominant which seems to require considerably more programming on the Arduino side.
Well, what if you didn't access either? Create a Stream object, and do all of your I/O with that. Now, on the Uno, you open Serial, and then assign that to the Stream object. On the Yun, you open Serial1, and then assign that to the Stream object. Or, if you don't want to disable the Bridge, start the Python code using the Process class, and assign the Process object to the Stream object. All of those classes: HardwareSerial, SoftwareSerial, EthernetClient (Ethernet shield library) and WifiWebClient (WiFi shield library) all derive from the Stream class. And, as it turns out, Process and YunClient from the Yun's Bridge library also derive from the Stream class.
(Would you be prepared to wite an example?)
You have not mentioned whether what you have in mind will also work unchanged on a Windows PC?
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.
I'm struggling to decide whether what you have in mind fits within that category or whether (even if it may be technically superior) it would introduce too much complexity for an inexperienced programmer.
(OK, I got 2.7.9 as suggested there. Installed it.Update: Got this sort of working.- The LED button does dontrol the LED- The graph does not appear- The slider does not move the servo..
Can you post a Python 3.1.4 version? I don't want to install 2 versions of Python.