With the ESP32-P4 not having any wireless functionality and instead focusing on being a small SoC, it makes sense to combine it with a second chip that handles features like WiFi and Bluetooth.
Arduino test code is run to see if the sensors are working properly, with built-in LED flashing when the sensor is triggered, and turning off when the sensor is released. The testing of the keys ...