RC servos applied in mazes to study rats
ฝัง
- เผยแพร่เมื่อ 10 ก.ย. 2024
- In this video we show how we can use an rc servo, controlled by an Arduino UNO, to dynamically modify the routes of a maze used for experiments with rats.
Mazes are widely used for experiments in behavioral testing, spatial learning, neuroscience and drug evaluation. If we can dynamically modify the closed and open passages, a new experimentation environment can be created.
Those who are going to use this firmware without any changes can use the toth.bin program to record directly from Eletrohow's repositories, without needing to use the interactive development system.
Toth was developed in the Linux Mint 20 environment. If you have any problems running it on another distribution or on Windows WLS, send us a message indicating the problem and we will create a suitable version.
To get the Toth installer:
wget eletrohow.com/s... (will download to current directory)
Then change the permission to executable:
chmod u+x install_toth.sh
Run the installer
./install_toth.sh
The toth.bin program will be installed in the .local/bin directory.
To run the program, type in a terminal:
toth.bin
Follow the instructions on the program screen.
To record the firmware exactly as it appears in the video, enter the board and port used, indicate the video number (51) and press the "Record" button. The minimum version to recognize video 51 is version 1.2.
To download the firmware so you can make modifications to it and use the standard Arduino environment to compile and save the program, use the "Download firmware" button.
The ports used by Arduino are the following:
D12 - Controls servo S1
D11 - Controls servo S2
D10 - Controls servo S3
D9 - Controls servo S4
Servos can be controlled via serial port commands or digital inputs
D6: Pull-up. If in 1 receives commands via serial port
If set to 0, it receives commands via digital ports (max and min)
If control via digital ports is desired, these are as follows:
D2: at 1 (or open), servo S1 at 0 degrees. at 0, servo S1 at 270 degrees
D3: controls S2 servo
D4: controls S3 servo
D5: controls S4 servo
Messages for control via serial have the following format:
Serial port at 38400.8,N,1
Recognized commands
0
Returns the firmware version
1, value between 0 and 180
Establishes the value in servo 1
2, value between 0 and 180
Establishes the value in servo 2
3, value between 0 and 180
Establishes the value in servo 3
4, value between 0 and 180
Establishes the value in servo 4