I am trying to use the tools module pyboard.py with idle3 and it does seem to work but with a couple of weird things going on. See interactive session below:
Code: Select all
Python 3.4.3 (default, Nov 17 2016, 01:11:57)
[GCC 4.8.4] on linux
Type "copyright", "credits" or "license()" for more information.
>>> import sys
>>> import pyboard
Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
File "/home/richard/pyboard.py", line 354, in execfile
pyb = Pyboard(device, baudrate, user, password)
File "/home/richard/pyboard.py", line 229, in __init__
raise PyboardError('failed to access ' + device)
pyboard.PyboardError: failed to access /dev/ttyACM0
The first weird thing is that the text output that occurs only occurs after the program has completed running (testing the leds) whereas it should appear first and does so if i run the command "python pyboard.py led.py" from the command line.
The 2nd weird thing is that the error related to failing to access /dev/ttyACM0 only occurs if i havent previously run the program from the command line.
My reason for doing this is to write a small very simple tkinter GUI that will run a pyboard script from idle.
Any help is much appreciated.