I’m creating a class that requires serial communication with a sensor. I’m initializing the class as shown below:
scale = None def __init__(self, port=SERIAL5, baud=9600): self.scale = streams.serial(port, baud=baud) print('Initialized')
The issue is that the code is stuck at the self.scale = streams.serial(port, baud=baud) line without any errors and the print statement doesn’t show in the console. I’ve used the same method for a sensor with I2C and it works fine. What’s the issue?