Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serial.Serial is commented out #4

Open
hansu opened this issue Jun 20, 2024 · 0 comments
Open

serial.Serial is commented out #4

hansu opened this issue Jun 20, 2024 · 0 comments

Comments

@hansu
Copy link

hansu commented Jun 20, 2024

I guess the comment mark before
#self.ser = serial.Serial(COM,baudrate=Brate,bytesize=Bsize,stopbits=StopB)
was unintended?
However it works only if removing that comment mark.

class PyDMX:
    def __init__(self,COM='COM8',Cnumber=512,Brate=250000,Bsize=8,StopB=2,use_prev_data=False,preserve_data_name="preserved_data.txt"):
        #start serial
        self.channel_num = Cnumber
        #self.ser = serial.Serial(COM,baudrate=Brate,bytesize=Bsize,stopbits=StopB)
        self.data = np.zeros([self.channel_num+1],dtype='uint8')
        self.data[0] = 0 # StartCode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant