How to interact with the pyboard?
I develop using Linux Mint and Eclipse running the pydev plugin. Initially, to display and interact with the pyboard, I made a slight modification to the pyterm script from this page. I changed line 27 so that screen is used instead of minicom. This will open a REPL to interact with the pyboard. However... I now use CoolTerm to interact with the pyboard. Why? I found that with the screen interaction, I had to exit the screen and physically disconnect and reconnect the pyboard before I could read data coming from it through the USB cable and one of the ACM ports. When I look at the data in CoolTerm, I can click the 'Disconnect' button at the top of the program and the data coming through the ACM port is immediately visible to the python scripts I am running to use this data.
Top tip: I had to use
sudo apt-get install libicu52:i386
to get CoolTerm to work with Linux Mint.
The CoolTerm window below shows some accelerometer data coming from an MPU6050 connected to a pyboard v1.0. Each line of data shows a scan of accelerometer data. The data is of the format:
START counter x_acc y_acc z_acc END
I used ctrl-c to stop the script running. I could then edit the files on the pyboard using Eclipse running pydev. After saving the changed files on to the pyboard, I use ctrl-d to do a soft reboot and start the modified script. As soon as I click on 'Disconnect' at the top of the CoolTerm, any data being sent through the ACM port can now be accessed, for example by a python script which uses the data to generate graphs of the accelerometer values.