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
http://45.77.173.118/ 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
Comments
Hi pénélope,
have a look at my previous post
http://www.cogsci.nl/forum/index.php?p=/discussion/454/solved-sending-triggers-to-nexus-trigger-interface-via-serial-port#Item_3
maybe it solves your problem
Daniel
NB/ I have found this discussion http://forum.cogsci.nl/index.php?p=/discussion/496/open-sending-triggers-for-eeg-through-serial-port/p1 but I don't know how to write a script as I am using the "graphical interface" of OpenSesame... Can anybody help me pleeeease? :-)
Hi,
I'm afraid that up until now, there's no plug-in for sending triggers via the serial port yet, which means that you will not be able to do this solely via the graphical interface (GUI). This needn't be a big problem, though, as the little bits of scripting that you need you can actually do via the GUI.
You will need to do as follows:
1 Place an item called
inline_script
at the very start of your experiment. Please rename it to 'serial_setup'.2 Copy the following code, and paste it in the Run Phase of the inline script that you've just created. Please do note to check what the address of your serial port is (usually it's 'COM1', but it could be e.g. 'COM2' or 'COM3' too).
3 Place another
inline_script
item at every moment that you want to send a trigger. In the Run Phase of thisinline_script
, paste the following code:Alternatively, if you have defined the values of your triggers in a loop, let's say in the variable
triggervalue
, use the following script:Good luck!
Edwin
UPDATE! If you do want to do things via the GUI, you could try using the plug-in that I've just put together. It hasn't been tested, as I do not have a PC with a serial port nearby, but it is very straightforward and should work.
To download, go to this GitHub page and follow the instructions.
Good luck!
Hello,
First of all thank you very much Skinnerwinner and Edwin for your answers!! >-
Edwin, thank you I have dowloaded the serial port without any problems but as I set the port adress to COM1 which is the port of my PC I had this error message:
Do you have any idea what I did wrong.....?
Thank you!
Cheers ^:)^
Oh, sorry, silly mistake of me. It's autodetecting, but the autodetect code is flawed (runs even if you don't specify it). I'll fix it when I'm near a computer again. In the meantime you could opt for the inline scripting option I explain above.
Okay thank you very much! =D>
I have thus add the inline script (at the very start of my expe and in my loop) and I have defined a variable named "code" which will be the value of my trigg (one code for each picture I present on the screen) so I have write in the script in my loop this:
Could you please confirm me it is the way to do it (because I thought variable should be named with [...] but when I do this it does not work so is that correct...? :-S
and a last question (hope so...) I would like my picture to be presented for 400 ms. With the parallel port I had to set the value of my picture at 0 and my trigg to 400 ms. How is it for the serial port, do I have to add a line in the script to set the duration (if so, which one....? :-? ) or do I have to set my picture to 400 ms...??
Ah, yes, this is something that often produces a bit of confusion. The notation with square brackets,
[variable]
van be used within OpenSesame's interface, as well as in OpenSesame syntax (which you see when you press the 'Edit script' button of an item).In an
inline_script
item, though, Python scripting is used. Python has a different syntax, so you will have to use a different approach to obtain a variable's value, i.e.self.get("variable")
.What you could do with the timing, is setting the sketchpad's duration to 0, add the inline_script directly after, and then put in an advanced delay item to have the system pause for 400 ms.
Good luck!
Hello Edwin,
Thank you again for your answer!!
Here is what I have done: set my sketchpad's duration to 0, add an inline-script just after and have writen "self.sleep(400)". Is that the correct way to put the advanced delay you are talking about? (I remind you that I would like to present my picture for 400ms and send a trigger right after ).
Many thanks!
Hi Pénélope,
The
advanced_delay
plug-in is a plug-in item that you can drag from the item toolbar into your experiment. So it's not really what Edwin meant, but using aself.sleep()
command is fine as well.One thing, perhaps to state the obvious, make sure to send the trigger before doing the sleep, like so:
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Sorry, sort of forgot this. Finally fixed the plug-in: https://github.com/esdalmaijer/opensesame_serial_port_trigger
Hi everyone,
I tried both methods described here.
For the plugin, if I want to drag the serial_port_trigger item to the correct place in my experiment I get an error message (which I send):
Traceback (most recent call last):
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libqtopensesame\widgets\tree_overview.py", line 753, in dropEvent
self.drop_event_item_new(data, e)
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libqtopensesame\widgets\tree_overview.py", line 672, in drop_event_item_new
item, new_items = self.drop_get_item_snippet(data)
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libqtopensesame\widgets\tree_overview.py", line 560, in drop_get_item_snippet
catch_exceptions=False)
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libqtopensesame\misc\qtitem_store.py", line 105, in new
script=script)
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\item_store.py", line 164, in new
u"Failed to load plugin '%s'" % _type, exception=e)
osexception:
Failed to load plugin 'serial_port_trigger'
item-stack:
exception message: 'unicode' object is not callable
time: Wed Apr 26 09:10:48 2017
exception type: TypeError
Traceback:
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\item_store.py", line 161, in new
self.experiment, script, self.experiment.item_prefix())
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\plugins.py", line 362, in load_plugin
item = item_class(item_name, experiment, string)
File "C:\Program Files (x86)\OpenSesame\share\opensesame_plugins\serial_port_trigger\serial_port_trigger.py", line 134, in init
serial_port_trigger.init(self, name, experiment, string)
File "C:\Program Files (x86)\OpenSesame\share\opensesame_plugins\serial_port_trigger\serial_port_trigger.py", line 53, in init
item.item.init(self, name, experiment, string)
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\item.py", line 67, in init
self.from_string(string)
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\item.py", line 285, in from_string
self.reset()
TypeError: 'unicode' object is not callable
Does anyone have an idea why this happens?
If I try the inline method I don't get an error message, so it may work, but I'm not sure. I opened notepad on the other computer (to which the trigger is send) and to my understanding (but maybe I'm false?) I should be able to see the triggers (1, 2, 3) in there if they are send. But I don't see any.
(I want to do eyetracking and send triggers for each trial, which then should show up in the eye-tracking logfile. However I can't check that currently, so therefore the notepad method... Because notepad should receive the triggers aswell, right?)
Hi Pia,
This plugin is simply not compatible with OpenSesame 3. So, assuming that the plugin won't be updated, you have two options:
inline_script
I would go with option 2, because then you can make use of the latest OpenSesame; and using pyserial in an
inline_script
is not that difficult:Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan,
thank you!
I also tried to use an inline_script and it didn't give any error message but I can't see the triggers on the other computer. (I opend notepad to check if I receive the triggers, not sure that method works, but shouldn't I receive the triggers (which I send from the other computer where Open Sesame runs) in Notepad aswell?)
I used the inline_scripts by Edwin. I think that COM1 is the correct port.
(I want to do eyetracking and send triggers for each trial, which then should show up in the eye-tracking logfile. However I can't check that currently, so therefore the notepad method... Because notepad should receive the triggers aswell, right?)
Thanks,
Pia
Hi Pia,
You'll have to be a bit more specific! I guess it's obvious (but just to be sure): If you start notepad, you just get an empty document. So I'm guessing you mean that you opened a specific file in notepad, and that you expected this file to contain triggers, but it didn't. Right?
So how exactly did you send the triggers, and what exactly did you expect to happen?
Also, how do you see the interaction between the eye tracker and EEG? Both devices keep their own logfile. Do you want to send the same trigger to both devices at the same time?
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan,
I have an eye-tracking experiment (no EEG-experiment, sorry for the confusion, I was just using this thread because I thought it makes no difference if I record EEG or eye-tracking on another computer) where I want to send triggers for the start of every trial.
So I copied the inline-script from Edwin. At the beginning of the experiment I have (copied from Edwin):
import serial
exp.trigger = serial.Serial('COM1')
exp.cleanup_functions.append(exp.trigger.close)
And then, when I want to send the trigger I put:
exp.trigger.write(chr(1))
On the other computer (which will do the eye-tracking recording) I opend Notepad to see if I receive the trigger. I just opened an empty file to see if I receive the trigger (1, in this case). But I don't. Maybe this approach is false (but I did similarly in the past). If the eye-tracking program receives the trigger, notepad should be as well, or am I false? Unfortunately I can't check with the eye-tracking program at the moment, I therefore just wanted to make sure the other computer does indeed receive the trigger.
Hi,
I now included a suggestion you gave elsewhere to write something to the debug window to test if the trigger had been send with the print statement just after exp.trigger.write(chr(1))
And it does show up there! (In the debug window, what I printed.) So I assume that the trigger is indeed send but I can't see it on the other computer yet.
Hi Pia,
Let's first take a step back.
A trigger is just a general term, which usually refers to a byte of information that is sent to an EEG recording device. (Although there's nothing wrong with using the term for other kinds of devices.) But triggers can be sent in many ways: through the parallel port, through the serial port, through a network, or through some kind of custom communication protocol.
So you first need to find out how you can connect with your eye tracker. What kind of eye tracker are you using? What does your eye tracking set up look like?
Cheers,
Sebastiaan
PS. I just closed two discussion that you opened about this general issue. For future reference: Please stick to one discussion for one question!
Check out SigmundAI.eu for our OpenSesame AI assistant!