Hi There,
OK it feels like we are getting closer! What happens if you write the integers instead of writing a string?
Try replacing:
port.write(b’1’)
with:
port.write(1)
I see this write method takes bytes and strings pySerial API — pySerial 3.4 documentation
But if you use integers does it appear in the data as expected?
I am less sure on what the stray trigger is - does the total number of triggers correspond to the total number of stimuli you expect? or are these extra?
Thanks,
Becca
Note: here is another method to try writing to the port Sending markers to EEG through serial port - #2 by Michael I think this was the solution for this user Sending markers to EEG through serial port - #12 by lindayu