Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Trigger EEG OpenBCI OpenSesame

edited July 2020 in OpenSesame

Dear All,

I am clinical and like most clinicians, I do not code, and I have difficulty putting triggers. I'm going to use OpenBCI as an eeg headset in a fairly simple experiment (see doc). 

I want to put a trigger at the start and end of the experiment and one for each appearance of stimuli. 

I'm following the procedure in tutorial but here is the error message: 

File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\libopensesame\", line 116, in run self.workspace._exec(self.crun) 
File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\libopensesame\", line 124, in _exec exec(bytecode, self._globals) Inline script, line 4, in <module> 
NameError: name 'io' is not defined 

Can you help me? Thank you very much in advance. 



  • Hi @Arno ,

    The script in your experiment assumes that there is a variable called io that corresponds to the dlportio library. However, this variable needs to be created first, in a simple script. The procedure is explained on this page:

    It's also important to note that this code is for sending triggers across the parallel port (which is a common way to send triggers, but not the only way.). Are you sure that's how your OpenBCI EEG recording equipment works? (I don't know, and it's not obvious to me from the OpenBCI docs!)



    Buy Me A Coffee

  • Thanks Sebastiaan!!

    But I can't do it, I'm really bad ... I tried all the possibilities with window, but nothing always the same error message ... There is not a small video for the bad like me.

    Thank you and good coffee !!!

  • edited July 2020

    Hi Arno,

    Have you tried using this code:

        from ctypes import windll
        global io
        io = windll.dlportio # requires dlportio.dll !!!
        print 'The parallel port couldn\'t be opened'

    in the beginning of your experiment (before you do global io?)

    But as Sebastiaan has already said, I'm not sure whether you send triggers with Openbci with the parallel port. Maybe that is something you can ask at their user support?


    Buy Me A Coffee

  • Hello!

    So I found out where my problem was. The EEG (OpenBCI) goes through the USB port and not a parallel port. How can I send triggers from OpenSesame to OpenBCI via the USB port? Thank you very much the community.


  • @Arno It seems that OpenBCI works through a Python library called brainflow . So the first step would be to install this. Next, you need to read the documentation for that library to see how you can connect to the device, and how you can send information to the BrainFlow logger (which would be similar to what you call a 'trigger'). I think you can do this with the log_message() function, but this is just based on a quick scan of their documentation. So first things first! I would start by carefully reading their documentation to get an idea of the OpenBCI workflow.

    Buy Me A Coffee

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games