This repository contains only the hardware and low-level support components
from the original RPi4_behavior_boxes codebase.
Included directories:
box_runtime/(active behavior, input, output, audio, mock-hardware, and camera runtime services)debug/(hardware test/debug scripts)environment/(environment specification files)docs/(design notes and Sphinx docs)sample_tasks/(reference task runner and example tasks)
Excluded from this split:
task_protocol/(task-specific experiment logic)obsolete/(legacy task code)
This repository was split from:
original/RPi4_behavior_boxes
to support independent versioning of hardware code and task code.
- Camera stack additions were imported from
matt-behaviorin Phase 2 (video_acquisition/,HQ_camera/, and relatedessential/video_acquisition/updates). - Visual stimulus delivery now uses precomputed YAML grating specs plus a persistent DRM/KMS worker instead of the legacy RPG/framebuffer path.
- Pi runtime prerequisite for real visual stimulus output:
python3-kms++. - Example specs live in
essential/visual_stimuli/.
- BehavBox now uses a profile-aware GPIO manifest loaded from
unified_GPIO_pin_arrangement_v4.csv. - Canonical runtime code uses semantic names such as
reward_left,trigger_in, andcue_led_5. - User-facing mock/web surfaces display semantic names plus board aliases such
as
reward_left (pump1)ortrigger_out (DIO2). - Hardware callbacks now enqueue structured
BehaviorEventobjects with detection-time wall-clock timestamps (name,timestamp) instead of plain event-name strings. - Compatibility helpers for task-side consumers are available on
BehavBox:event_name(event)event_timestamp(event)
- Non-Raspberry Pi hosts automatically use a mock GPIO backend and launch a local web UI.
- Default UI URL:
http://127.0.0.1:8765 - Optional environment overrides:
BEHAVBOX_MOCK_UI_HOSTBEHAVBOX_MOCK_UI_PORT
Quick launcher:
python debug/run_mock_behavbox.py