This is very dependent on the hardware. There are predone LED matrix that require simple I/O connections or serial interfaces or there is the make your own approach. This drives how the code works so we would need to know your application and what you plan on doing