Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- To drive a HUB75 display panel using the Makerfabs ESP32-Trinity Controller, you'll first need to install the PxMatrix library. This library allows for the control of HUB75-type RGB LED matrices with the ESP32.
- This code will write "Hello, world!" to the display. You can modify it to display whatever you need.
- Please make sure to check the pin configuration, display size, and refresh rate to match with your own HUB75 display.
- Remember that not all HUB75 panels are created equal, so some may require different setup configurations. It's always best to refer to the datasheet of your specific panel if things aren't working as expected.
- This code is quite basic and there's a lot more you can do. For example, you could connect the ESP32 to the internet and display live data, or you could create animations. The PxMatrix library has a lot of functionality that you can use to create more advanced displays.
- Here's an example sketch that you can modify to fit your needs:
- */
- #include <PxMatrix.h>
- // Pins for the ESP32 are defined here
- #define P_LAT 22
- #define P_A 19
- #define P_B 23
- #define P_C 18
- #define P_D 5
- #define P_E 15
- #define P_OE 2
- // Change this to the width and height of your specific display panel
- #define matrix_width 64
- #define matrix_height 32
- PxMATRIX display(matrix_width, matrix_height, P_LAT, P_OE, P_A, P_B, P_C, P_D, P_E);
- void setup() {
- Serial.begin(9600);
- // Define your display layout here, e.g. 1/8 step
- display.begin(8);
- // If your panel has a different refresh rate, set it here:
- display.setFastUpdate(true);
- display.setMuxPattern(BINARY);
- display.fillScreen(0);
- display.setTextColor(myRED);
- display.setCursor(2,0);
- display.print("Hello, world!");
- display.display();
- }
- void loop() {
- // put your main code here, to run repeatedly:
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement