I am using raspberry pi 3 to build an interface in tkinter. And there is an emergency button connected to Arduino nano. Arduino
I am using raspberry pi 3 to build an interface in tkinter. And there is an emergency button connected to Arduino nano. Arduino Nano sends signal through USB serial port. And I read value in the serial port using periodically calling function. And when user presses the emergency button I wanted to call the function disconnect which is inside of the class where Tkinter is build. elif(read_ser=="emer"): RobotController.disconn(). But the error I get says that the disonn function needs 1 required argument self, if I put self it says 'self' is not defined. If I do like this (RobotController is the class name): x=RobotController() x.disconn() it says that x=RobotController( ) requires 1 information 'master'. If I put 'master' there I got another error