1. SMD size
- Pixel Pitch
Pixel pitch is the distance between 2 pixels in LED screen. 1 pixel is the center point in 1 LED. The distance between 2 LEDs (center point) is the pixel pitch in LED display.
SMD2121 LED's dimension is 2.1x2.1mm. P2 is 2mm pixel pitch. The LED’s dimension is bigger than 2mm pixel pitch. Therefore P2 LED display is SMD1515 or SMD1010.
- Resolution
1 LED is 1 pixel in LED screen. Small SMD LEDs will have more pixels than big SMD LEDs in same screen size. And resolution has pixels in horizontal direction and vertical direction. More pixels means higher resolution.
- Cost
Like other electronic component, the smaller in SMD, the more expensive in cost. And in same module size, small SMD LED module need more electronic components like Wires, ICs. In same module size, it has more LEDs in small SMD LEDs.
- Maintenance
Small SMD LEDs cost more in maintenance. You can change broken LEDs in big SMD LED modules. But it is difficult to change broken LEDs in small SMD LED modules. Then you have to change the whole modules.
Ref: https://www.twleddisplay.com/blog/how-do-the-numbers-in-smd-determine-led-display
2. PxMatrix library
PxMatrix for ESP32 or ESP8266 https://github.com/2dom/PxMatrix
Ref
https://github.com/galagaking/PongESP32
https://github.com/witnessmenow/LED-Matrix-Display-Examples with video https://www.youtube.com/watch?v=YvU_ZfF7vs4