Simple Arduino sketch that sends a stop signal over serial whenever pin 2 is low. For use with Ephys Link.
- Any Arduino which supports
attachInterrupt
on pin 2 (the specific pin can be edited later if desired) - Serial connection between Arduino and target device
- A switch or button and appropriate wiring (anything that will close a circuit when pressed)
- Simply attach a switch or button to connect pin 2 to GND when pressed
- Install or get the latest version of the Arduino IDE
- Clone this repo (
git clone https://github.com/VirtualBrainLab/stop-signal.git
) - Open
StopSignal.ino
- Attach an Arduino
- Select the Arduino used and the port it is attached to through the "Tools" menu
- Upload
- When the switch is open, nothing will happen.
- Whenever the switch is closed, pin 2 will be put to
LOW
and a1
(with a new line symbol) will be printed to serial.