Bugs in SpokPOV.py for serial under Linux?

SpokePOV kit for bikes

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
systest
 
Posts: 8
Joined: Fri Aug 18, 2006 5:02 pm

Bugs in SpokPOV.py for serial under Linux?

Post by systest »

To begin with I am NOT a python coder. Having said that, I believe there may be a few bugs in the serial I/O section of the SpokePOV.py v1.2 script under Linux.

1) Fails to scan for true serial port
I was having difficulty with a USB to serial converter so I tried using a real serial port. This returned the error:
...
File "./SpokePOV.py", line 994, in __init__
commport = Availableports[0][1]
IndexError: list index out of range

I believe this is because line 144 fails to look for a serial device/"com port" under Linux. I resolved this issue by changing the line
from: for i in (glob.glob('/dev/cu.*') + glob.glob('/dev/tts/ttyUSB*') + glob.glob('/dev/ttyUSB*')):
to : for i in (glob.glob('/dev/cu.*') + glob.glob('/dev/tts/ttyUSB*') + glob.glob('/dev/ttyUSB*') + glob.glob('/dev/ttyS*')):


2) Attempts to read, write or verify result in the following error:
...
File "./SpokePOV.py", line 312, in setbit
self.s.setBreak(1)
AttributeError: 'Serial' object has no attribute 'setBreak'

I don't see a "setBreak" method in the documentation for pySerial. There is a "sendBreak" but it does not take any parameters. Does anyone have a suggestion how to correct this?

Locked
Please be positive and constructive with your questions and comments.

Return to “SpokePOV (discontinued)”