Raspberry Pi Setup Guide¶
This guide provides essential commands for setting up Ethopy on a Raspberry Pi (RP) device.
Prerequisites¶
-
Raspberry Pi image Follow the instructions in the Raspberry Pi documentation to install the image and set up your Raspberry Pi.
-
SSH Setup Enable the SSH service to allow remote access to your Raspberry Pi via the terminal:
1 2 |
|
EthoPy setup¶
Step 1: Ethopy Installation¶
Once your Raspberry Pi is set up, you can connect to it from your computer's terminal based on Raspberry Pi documentation.
- Verify python version:
1
python --version
EthoPy requires Python >=3.8, < 3.12
- Setting Up a Virtual Environment
1 2 |
|
1 2 |
|
1 2 |
|
Once activated, proceed with installation.
-
Install Ethopy:
1
pip install ethopy
-
Create configuration file at
~/.ethopy/local_conf.json
:1 2 3 4 5 6 7 8 9 10 11 12
{ "dj_local_conf": { "database.host": "YOUR DATABASE", "database.user": "USERNAME", "database.password": "PASSWORD", "database.port": "PORT", "database.reconnect": true, "database.enable_python_native_blobs": true }, "source_path": "LOCAL_RECORDINGS_DIRECTORY", "target_path": "TARGET_RECORDINGS_DIRECTORY" }
For detailed desciption of configuration files, see Local configuration.
Step 2: Database connection¶
1 |
|
Step 3: GPIO Hardware Support¶
Enable pigpio daemon for GPIO control:
1 2 |
|
Install GPIO libraries:
1 2 |
|
Step 4: Display Configuration¶
Configure display settings for GUI applications via SSH:
1 2 3 |
|
Step 5: Screen Blanking Disable¶
To prevent screen from turning off, run raspi-config:
1 |
|
Navigate to "Display Options" → "Screen Blanking" → Set to "No"
Step 6: Run your first experiment¶
1 |
|
Troubleshooting¶
Common Issues¶
-
Display Issues
-
Ensure DISPLAY is set correctly in ~/.profile
- Check X server is running
-
Verify permissions with
xhost +
-
GPIO Access
-
Verify pigpiod service is running:
systemctl status pigpiod
-
Check user permissions for GPIO access
-
Database Connection
-
Test connection:
ethopy-db-connection
- Check network connectivity to database server
- Verify credentials in local_conf.json
Where to Go Next¶
Now that you have a basic understanding of EthoPy:
- Creating Custom Components
- How to create a Task
- Explore the Plugin System to extend functionality
- Dive deeper into Local Configuration for advanced settings
- Understand setup configuration index
- Learn more about Database Setup
- Study the API Reference for detailed documentation
- Check Contributing if you want to help improve EthoPy