Code: Select all
import serial
usbport = '/dev/ttyAMA0'
ser = serial.Serial(usbport, 9600, timeout=1)
ser.write("Raspberry pi\r\n")
x = ""
while chr(3) not in x:
x = ser.readline()
print x
ser.close()the errors after i ran the python source code..
Code: Select all
File"hello.world.py", line 9, in <module>
while chr(3) not in x:
TypeError: argument of type 'builtin_function_or_method' is not iterable