For a diploma thesis in biology (not mine) I built a so called skinner-box. Basically a chicken gets a food reward when picking on the screen when shown a learned stimulus. Elotouch "Accutouch" touchscreens are often used because they are thicker and withstand the picks of a chicken. Since there was no library for those touchscreens I had to write the code by myself. The touchscreen I used came with a serial controller and after some research I finally found a datasheet how to interprete the data.
Usually a display (monitor) is used behind the touchscreen to show a stimulus to the subject. In our case instead of the monitor is a real thing as stimulus lighted differently. There are 2 lamps, but only one at a time is used. We used a relais and conventional lamps (230V). There are different program modes, which differ slightly. Each mode starts with a 20 s pause at the beginning of a round, then stimulus phase 10s and a food phase 5s and then starts the next round until aborted manually.
First, we logged each pick together with some other data (x,y-coordinates, number of runs, chicken number etc) directly to a connected notebook running the software "Gobetwino". Later I had to involve a SD card reader/writer to read and save some variables, but, however, kept on logging with Gobetwino.
A LCD, some resistors, pushbuttons and a LED completes it. The wooden box and the food dispenser was made in our workshop.
I made a YT video about it. If you like to see it: ChickenBox - an Arduino based skinner-box [final video] HD - YouTube