- Python Package Name: arena_interface
- Description: Python interface to the Reiser lab ArenaController.
- Version: 0.1.0
- Python Version: 3.10
- Release Date: 2024-11-11
- Creation Date: 2023-10-17
- License: BSD-3-Clause
- URL: https://github.com/janelia-python/arena_interface_python
- Author: Peter Polidoro
- Email: [email protected]
- Copyright: 2024 Howard Hughes Medical Institute
- References:
- https://github.com/janelia-arduino/ArenaController
- Dependencies:
- click
from arena_interface import ArenaInterface
arena-interface --help
# Usage: arena-interface [OPTIONS]
# Command line interface to the Reiser lab ArenaController.
# Options:
# -p, --port TEXT Device name (e.g. /dev/ttyACM0 on GNU/Linux or COM3
# on Windows)
# --debug Print debugging information.
# -h, --help Show this message and exit.
https://github.com/janelia-python/python_setup
-
Drivers
GNU/Linux computers usually have all of the necessary drivers already installed, but users need the appropriate permissions to open the device and communicate with it.
Udev is the GNU/Linux subsystem that detects when things are plugged into your computer.
Udev may be used to detect when a device is plugged into the computer and automatically give permission to open that device.
If you plug a sensor into your computer and attempt to open it and get an error such as: "FATAL: cannot open /dev/ttyACM0: Permission denied", then you need to install udev rules to give permission to open that device.
Udev rules may be downloaded as a file and placed in the appropriate directory using these instructions:
-
Download rules into the correct directory
curl -fsSL https://raw.githubusercontent.com/platformio/platformio-core/master/scripts/99-platformio-udev.rules | sudo tee /etc/udev/rules.d/99-platformio-udev.rules
-
Restart udev management tool
sudo service udev restart
-
Ubuntu/Debian users may need to add own “username” to the “dialout” group
sudo usermod -a -G dialout $USER sudo usermod -a -G plugdev $USER
-
After setting up rules and groups
You will need to log out and log back in again (or reboot) for the user group changes to take effect.
After this file is installed, physically unplug and reconnect your board.
The Python code in this library may be installed in any number of ways, chose one.
-
pip
python3 -m venv ~/venvs/arena_interface source ~/venvs/arena_interface/bin/activate pip install arena_interface
-
guix
Setup guix-janelia channel:
https://github.com/guix-janelia/guix-janelia
guix install python-arena-interface
The Python code in this library may be installed in any number of ways, chose one.
-
pip
python3 -m venv C:\venvs\arena_interface C:\venvs\arena_interface\Scripts\activate pip install arena_interface
git clone [email protected]:janelia-python/arena_interface_python.git
cd arena_interface_python
make -f .metadata/Makefile metadata-edits
make -f .metadata/Makefile metadata
make -f .metadata/Makefile guix-dev-container
exit
make -f .metadata/Makefile guix-dev-container-ipython
import arena_interface
exit
make -f .metadata/Makefile guix-container
exit
make -f .metadata/Makefile upload
make -f .metadata/Makefile guix-dev-container-port-serial # PORT=/dev/ttyACM0
# make -f .metadata/Makefile PORT=/dev/ttyACM1 guix-dev-container-port-serial
? # help
[C-a][C-x] # to exit
https://docs.docker.com/engine/
make -f .metadata/Makefile docker-dev-container
exit
make -f .metadata/Makefile docker-dev-container-ipython
import arena_interface
exit
make -f .metadata/Makefile docker-container
exit