Zoo elephants get a musical toy to enrich their lives | Arduino Blog
An Arduino Mega 2560 board plays the tones through a DY-SV5W media player module, which outputs an audio signal to an outdoor speaker system. Each hole in the wall has a VL53L0X ToF (Time of Flight) sensor to detect trunks. Those sensors were paired with ATtiny85 microcontrollers that tell the Arduino when a trunk is present.