Python Forum

Full Version: Serial Communication Error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I am new to python. I was facing an issue while using serial communication. I am sending 1 byte data from a device to the raspberry pi board using serial to USB converter. The error I was getting is given below
Attribute error: 'Serial' object has no attribute 'inwaiting'

The program is given below,

import serial

ser = serial.Serial(port='dev/ttyUSB0',baudrate=9600)
try:
data = ser.read()
response=ser.read(ser.inwaiting)
print(data)

finally:
ser.close()


Please reply as soon as possible

Thank you,
Alphy
ser.inWaiting() not ser.inwaiting.

Use proper code tags in this forum.