Skip to content

SjulsonLab/RPi4_behavior_boxes_hardware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RPi4 Behavior Boxes Hardware (still in development)

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)

Origin

This repository was split from: original/RPi4_behavior_boxes

to support independent versioning of hardware code and task code.

Integration Notes

  • Camera stack additions were imported from matt-behavior in Phase 2 (video_acquisition/, HQ_camera/, and related essential/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/.

Head-Fixed GPIO + Mock UI

  • 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, and cue_led_5.
  • User-facing mock/web surfaces display semantic names plus board aliases such as reward_left (pump1) or trigger_out (DIO2).
  • Hardware callbacks now enqueue structured BehaviorEvent objects 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_HOST
    • BEHAVBOX_MOCK_UI_PORT

Quick launcher:

  • python debug/run_mock_behavbox.py

About

Codex-based refactoring of the RPi behavior box hardware code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors