Displaying on 4×4 Led Matrix

Hi, I am really struggling to code my home built 4×4 led matrix. The idea is to display 2 digits on the Matrix which changes with time. I decided it will be best to make it look like a scrolling text since I can display more than 1 digit in a 4×4. I am using transistors as switches and I have connected them directly to my Arduino Uno digital pins.

But I have been struggling to find or come up with a code for 4×4 led matrix that would help me display digits.

Please help out with suggestions or point me towards helpful resources.

EDIT: I rearranged the setup to a 3x5 and I am not using any IC to connect my LEDs to the Arduino. Here is a rough sketch of how the setup looks like. (base pins from transistors are connected to the Arduino while the collector pins are connected to +5v)

Post a schematic.

As a general comment, because we have no other details, it is difficult to display digits in a 4x4 matrix. The smallest legible display is really a 3 wide by 5 high matrix, which is about the same number of LEDs (5x3=15 vs 4x4=16) but arranged differently.

Thank you very much for this idea. I rearranged the LEDs now and I am trying to figure out how to write the code from scratch. Here is what the schematic looks like. All the base pins leaving the transistor goes directly to digital pins in the arduino