May-05-2017, 03:58 PM
Hi All,
I'm very new to Python and working on a Raspberry Pi project to send data out of the UART. It all works fine when sending less than 8 characters at a time. Sending more characters with the serial.write command causes the only the first 8 characters to be sent and the remaining are lost. I'm assuming the UART output buffer is only 8 bytes long. The pySerial documentation says the 'serial.out_waiting' property will show the number of characters in the output buffer. Unfortunately Python 2.7.9 and 3.4.2 does not recognize this property. Here is my code:
Does anybody have any ideas? Thanks!
Kevin
I'm very new to Python and working on a Raspberry Pi project to send data out of the UART. It all works fine when sending less than 8 characters at a time. Sending more characters with the serial.write command causes the only the first 8 characters to be sent and the remaining are lost. I'm assuming the UART output buffer is only 8 bytes long. The pySerial documentation says the 'serial.out_waiting' property will show the number of characters in the output buffer. Unfortunately Python 2.7.9 and 3.4.2 does not recognize this property. Here is my code:
ser=serial.Serial(...) ser.write('ABC') num=1 while (num < 1): num=ser.out_waiting() #error occurs here ser.write('DEF')The exact error message says "Attribute Error: 'Serial' object has no attribute 'outWaiting'
Does anybody have any ideas? Thanks!
Kevin