Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

zerotonin/currentsensation

Open more actions menu

Repository files navigation

currentsensation

tests docs License: MIT

Raspberry-Pi experiment controller for insect electroreception assays: three colour-coded GPIO-driven current lines, a startle shaker, a light, and synchronised video or image capture.

Originally written in 2017 (Python 2) for a single experiment; refactored in 2026 into a small Python 3.11+ package with a mock GPIO backend so the scheduling and analysis pieces can be developed and tested off-Pi.

Hardware

Channel Default GPIO (BCM) Purpose
red 18 current line A
blue 24 current line B
yellow 8 current line C
light 14 illumination for camera frames
shaker 13 mechanical startle stimulus

Pin assignments live in currentsensation.constants and can be overridden per deployment.

Install

# off-Pi development (mock GPIO backend, no RPi.GPIO needed)
pip install -e ".[dev]"

# on a Raspberry Pi
pip install -e ".[pi]"

Quickstart

currentsensation run \
    --save-dir /mnt/data/expt-2026-05-15 \
    --reps 3 \
    --stim-dur 1800 \
    --peri-stim-dur 30 \
    --shake-dur 30 \
    --lines red,blue,yellow \
    --capture video

Citation

If you use this software, please cite via the metadata in CITATION.cff.

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.