Matrix M5.dis



  • I just purchased some M5 Atom Matrix devices and I want to start programming the LEDs. Where do I find documentation for the M5.dis API? The sample code does very little and I can't find any reference to M5.dis in the docs I've been able to find.


  • M5Stack

    Hey are you programming in arduino or uiflow? you can check out these videos to get started

    arduino
    https://www.youtube.com/watch?v=2f4biAfvC_M

    uiflow
    https://www.youtube.com/watch?v=4dr5Y5ssQTk&t=201s



  • Thanks, but that doesn't answer my question. I'm looking at the sample apps and I see references to M5 methods, and M5.dis but I cannot find reference documentation for them anywhere.

    Where are the reference docs for the M5 SDK? What are the methods, properties, etc. for the M5.dis object?



  • Hello John

    Have you seen this? https://github.com/m5stack/M5Atom#display-api-document

    Felix



  • @felmue Thanks, yes, I have - but that's not documentation for M5.dis object, that's documentation for some methods in a utility library that isn't even loaded by the M5 library.

    led-matrix:14:10: error: 'class LED_Display' has no member named 'fillpix'
    
       M5.dis.fillpix(CRGB::Black);
    
              ^
    
    exit status 1
    'class LED_Display' has no member named 'fillpix'
    

    I'm trying to figure out how to work with the matrix display on the Atom Matrix and I can't find any examples, end to end, that work. I found a reference to M5.dis but I'm just not seeing anything that references it or real examples of how to use it.

    I tried using FastLED which is what the utility/LED_DisPlay.h code uses under the covers, even submitted some PRs today to tighten up that code, but as soon as I make any call to FastLED to update the display or show pixels, the sketch crashes.



  • Not sure why, but the sketch was crashing for me as well, until I commented out the include M5Atom.h and m5.begin lines.



  • Hi John

    The M5.dis object is defined in M5Atom.h as a member of M5Atom class:

    class M5Atom
    {
    ...
        LED_DisPlay dis;
    ...
    }
    extern M5Atom M5;
    

    For the M5Atom examples to compile I had to add M5Atom and FastLED libraries to the project. (In PlatformIO I can simply drop the two libaries into the lib directory of the project. Not sure how that works with Arduino IDE, sorry.)

    Felix



  • @felmue aaah, OK, I missed that when I looked at the source. Thanks.

    I'm loading M5Atom.h and FastLED.h and its just not working for me.