Yes, I can see across the forums and discussions that people have problems with this, so I think clearing codes should definitely be the default.
Thanks for the explanation on the serial pins. Yeah, I am using trigger codes such as 10, 20, 30 etc. (up to 100). I was just wondering, as a complete newbie, whether it matters which pins are being used and whether consequently we want to be careful about the codes (other than the restrictions that you mentioned). But it looks like it doesn’t. I ran your demo and these are the events extracted with BDFbrowser (which I assume are the pins):
Onset,Duration,Annotation
+6.7519531,,Trigger Input 1
+7.7514648,,Trigger Input 2
+7.7514648,,Trigger Input 4
+8.7519531,,Trigger Input 4
+8.7519531,,Trigger Input 5
+9.7519531,,Trigger Input 6
+10.7514648,,Trigger Input 7
+11.7514648,,Trigger Input 2
+11.7514648,,Trigger Input 4
+11.7514648,,Trigger Input 5
+11.7514648,,Trigger Input 6
+11.7514648,,Trigger Input 7
+12.7514648,,Trigger Input 1
+12.7514648,,Trigger Input 2
+12.7514648,,Trigger Input 3
+12.7514648,,Trigger Input 4
+12.7514648,,Trigger Input 5
+12.7514648,,Trigger Input 6
+12.7514648,,Trigger Input 7
+12.7514648,,Trigger Input 8
And the number of events and trigger codes recognized by the mne.find_events seem fine:
events = mne.find_events(raw)
Trigger channel has a non-zero initial value of 65536 (consider using initial_event=True to detect this event)
Removing orphaned offset at the beginning of the file.
7 events found
Event IDs: [ 1 10 24 32 64 122 255]
Is the non-zero initial value expected?
Thanks!