This Unity-based project, developed by the Mohajerani Lab, is designed for operant conditioning experiments with touchscreen-enabled behavioral studies in rodents. The Unity application interfaces with a Raspberry Pi running the PiController project to enable seamless control of connected hardware, including stimuli presentation and reward dispensing.
The Touchscreen Chamber Unity Project operates as the central software interface for conducting experiments. This project leverages a PI controller on a Raspberry Pi for hardware control, allowing the Unity application to control and monitor various peripherals connected to the Raspberry Pi (e.g., touchscreens, reward dispensers). When deployed together on the same network, this Unity project can communicate with the PiController to execute experimental protocols with precise control over all hardware components.
You have two options to set up the application:
Clone this repository:
git clone https://github.com/Mohajerani-Lab/touchscreen-chamber-unity.git
Open this project in Unity 2021.3.8f1.
Make any necessary changes to the project to suit your experimental requirements.
Build the project as an APK file for Android deployment. Go to File > Build Settings, select Android, and then Build.
Deploy the APK to a compatible tablet. This project has been tested on a Samsung Galaxy Tab A 8.0 SM-T350.
Download the latest APK from the releases page.
Transfer the APK to your tablet and install it.
Ensure the Unity app and PiController are both connected to the same network to enable communication.
The Unity application communicates with the PiController on the Raspberry Pi to manage hardware components. This setup enables the Unity app to issue commands to the Pi for real-time control of devices like reward dispensers or sensors. The PiController project serves as a bridge to control and monitor hardware directly.
Setup the Chamber Configuration: Adjust experiment parameters in Unity.
Connect to PiController: Ensure the Unity app can connect to the PiController over the network.
Run Experiment: Press Play in Unity to initiate the experiment. Unity will send commands to the PiController for real-time control of peripherals.
Data Collection and Export: Experimental data is saved within Unity’s designated output folder.
Assets/
Scripts/
Scenes/
Resources/
Contributions are welcome. Follow these steps:
git checkout -b feature-name
).git push origin feature-name
).This project is licensed under the MIT License. See the LICENSE file for more details.
For more information, please contact the Mohajerani Lab.