yes.
but it’s inefficient.
you could just display barcodes or QR codes on regular panels, use a camera to read those.
or you could use IRDA communication, or radio communication like wifi, bluetooth, something custom based on nRF, or ESP-NOW… which you should take a look at. the Espressif ecosystem makes a lot of sense for IOT and “hobby” robotics.