https://github.com/marcobarilari/triggerino
WIP repo for an Arduino based mock triggers input to use for developing fMRI stimulation code
https://github.com/marcobarilari/triggerino
arduino arduino-leonardo fmri psychtoolbox trigger
Last synced: about 1 month ago
JSON representation
WIP repo for an Arduino based mock triggers input to use for developing fMRI stimulation code
- Host: GitHub
- URL: https://github.com/marcobarilari/triggerino
- Owner: marcobarilari
- License: mit
- Created: 2020-09-19T09:39:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-08T13:25:12.000Z (about 5 years ago)
- Last Synced: 2025-04-06T19:54:14.678Z (about 1 year ago)
- Topics: arduino, arduino-leonardo, fmri, psychtoolbox, trigger
- Language: MATLAB
- Homepage:
- Size: 484 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# triggerino
Arduino based mock trigger device to use for developing fMRI stimulation code (in case you need to sync your stimulation with the MRI triggers).
---
Basic use: while the button is pressed, it will flash the led and send a letter (e.g., a 't') every x msec (e.g., 1800 msec) to the connected computer.
## Code
In `triggerino.ino` set the trigger key and the TR according to your need (see example below)
``` c++
// set trigger key
char triggerKey = 't';
// set TR in msec
int TR = 1800;
```
## Circuit

Elements you need:
- Arduino Leonardo (compared to the classic Arduino UNO, computers and Matlab see it as an external keyboard)
- micro USB cable
- breadboard
- 6 jumpers
- 1 basic led
- 1 basic button
- 2 resistors (220 Ω and 10 kΩ)
## How to use it
`sandbox_getTrigger.m` is a PsychtoolbBox based script that waits for the Arduino input (a keyboard stroke) to do something.