Skip to content

Events from GUI #78

Answered by alustig3
bdudok asked this question in Q&A
Apr 26, 2023 · 1 comments · 6 replies
Discussion options

You must be logged in to vote

Hi bdudok,

Sending an event from the GUI is not officially supported as far as I can tell. Our lab had the same exact desire to be able to manually deliver reward from the GUI, so we hacked together a solution.

In a nutshell, first we create a custom variable dialog with a button. The button communicates with Pycboard instance which then sends a serial message over USB to the pyboard microcontroller. The pyboard microcontroller is running a modified framework.py which recognizes the serial message, and then executes a function that is defined in the task file.

It is an inelegant and not flexible/hard-coded solution, but it works.

You can study the changes I made to give a basic example of…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@bdudok
Comment options

@alustig3
Comment options

@bdudok
Comment options

@alustig3
Comment options

@bdudok
Comment options

Answer selected by bdudok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants