Note that the smiley faces were original an 8 followed by a ).
My mental picture of the Bridge is a Python dictionary with read/write access from both processors. That makes passing static text between the two a fairly simple matter, but needs a bit of work if the two processors have to function in lock step.
The lack of documentation for the Python side of the Bridge means that its designers only really expect the vast majority of people to use the MPU as a means of supplying internet services to an Arduino Leonardo.
So it seems to me that I would get more out of my Yun if I pushed the bulk of the processing out of the Leonardo and into the MPU, leaving the Leonardo to manage digital and analogue i/o and manage I2C sensors, etc., plus any real world stuff that might require immediate attention.
With that in mind, I have defined Python versions of my old Arduino programming favourites:digitalRead()digitalWrite()analogRead()analogWrite()
I can't help thinking that this is already defined somewhere, but I can't find it. If it is, please tell me where.
import sysimport json# Process until the end of the world (or reset, whichever comes first.)while True: # wait for and read a line of text from the sketch (stdin) # strip any whitespace characters line = raw_input().strip() data = json.loads(line)