Don't understand why I am getting these errors.
Code: Select all
import usb_cdc
if (usb_cdc.Serial.connected): # This works okay
print ("True")
print ("Bytes - ", usb_cdc.Serial.in_waiting)
#Bytes - <property> Don't understand why it is a property when it should be an <int>???
usb_cdc.Serial.timeout:3 # I want the function to move on after 3 seconds if no input
#A = usb_cdc.Serial.read()
#TypeError: function missing 1 required positional arguments
#A = usb_cdc.Serial.read(1)
#TypeError: argument has wrong type