Need help with ESP32 and MAX7219

Posted on
  • Hi,
    I try to wire my LED Matrix(MAX7219) up to a ESP32 DEVKIT V1. To my knowledge, this code should turn all LEDs on:

    SPI2.setup({mosi:D23, sck:D18});
        let g = require('MAX7219').connect(SPI2,D5,4);
        g.displayTest(true);
    

    but nothing happens. At the start all LEDs flicker and than turn off or stay lit in random patterns.
    I double checked the wiring . I'm trying to connect via VSPI Ports on the board.

  • Please don't double-post your questions on the official boards forum. This is the right place - I've deleted your other post.

    Try using software SPI rather than hardware SPI, that may solve your issues...

    var spi = new SPI();
    spi.setup({mosi:D23, sck:D18});
     let g = require('MAX7219').connect(spi,D5,4);
    ...
    
  • Hi,
    thank you for your help, but using software SPI does not fix it.
    I've try also non SPI Port as software SPI no luck.
    What bothers written in C it works fine.

    P.S: Sorry for double-posting I found the right forum after making the first post.

  • This is the code I use for an ESP32 with MAX7219. Relevant init code at the end.

    https://github.com/conoro/im-on-a-call-ble/blob/master/light_esp32.js

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Need help with ESP32 and MAX7219

Posted by Avatar for Ponzius @Ponzius

Actions