M5ez, a complete interface builder system for the M5Stack as an Arduino library. Extremely easy to use.

  • @rop
    I’m completing my first project using M5ez/M5stack. A remote control.
    I would like to indicate two things on a menu, the current state of the remote equipment and the next state (that will become the current state when the “select” button is pressed and a ESP-Now message is sent/acknowledged).
    The next state is your select item black cursor line with reverse text but people might think that is the current state of the remote equipment—if they forget to press “select”. I could automatically send the message after dwelling on a selection after a few seconds like a tv remote. But I’d like to make them explicitly press “select” with this remote equipment.
    I now indicate current state by putting it as the first item on the menu and using bold text but a green check mark ✅ or dot ⚫️ would be more assertive. Unless I’m overlooking a better method.
    Thanks again for M5ez.

  • I am failing hard on the progressbar, is there any other pointer or example people could share.

    I have been reading for a few days, but i just dont get it.

    I am not sure about pb.value(float val)

    i want to add or distract 10 on a button push, but i am failing hard.

              if (btnpressed == "up")
              else (btnpressed == "left"); {
              pb = pb + 10; ;
              if (btnpressed == "right"); {
              pb = pb + 10; 

    Would be nice to abuse the progressbar for things like volume or dimmer status and if any one has a pointer. thanks in advance.

  • @Rop
    I forgot M5EZ blocks!
    Doesn’t lend itself to a controller at all.
    Starting over.

  • Okay i can get some value in to pb now and raise it once with + 10 by pushing a button and then i stall.

    void add(){
          ezProgressBar pb ("Dimmer", "Dims te kitchen light", "LEFT#UP#RIGHT");
      while (val <= 101 && val >= 1 ) {
            String btnpressed = ez.getButtons();
        if (btnpressed == "UP") loop(); 
        if (btnpressed == "LEFT") {
            pb.value(val - 10);}
        if (btnpressed == "RIGHT") {
            pb.value(val + 10);

    but i am not giving in until i got this running.

    Any one that can give this noob some pointers ? It doesn't have to be a fixed solution but after some days of learning i am kind of blinded

  • @r_255 Whoops... I just noticed yesterday that progressBar is broken in that it can only go up, not down. Expect a fix with the all new M5ez 2.0, out as soon as I am done. (It's 85% there, a few days more...)

    2.0 will also have backlight setting, a clock in the header bar as well as definable header widgets and the ability to register functions to be part of M5ez's idle loop.

  • Thats good to know, so it could be that it isnt me... Learned a lot the past days! Thanks

    Still have some issues on loosing connection over time, but not sure if that is me or the m5stack. Am i the only one ?

    PS: backlight dimming would be nice on a ProgressBar, if it isnt to much work.

  • @bobolink
    I solved the blocking issue by putting the UI on one core and the communications (esp-now) on the other.

  • Thanks bobolink, i will find some lessons about using the 2 cores of the esp32.

  • @r_255
    Good luck. I’ll try to post a skeleton example somewhere. But you might start here:
    Research a mutex for sharing data between processes.
    Also, @Rop says he is adding registration of functions to execute from his idle loop.

    I think M5Stack and M5ez have a great future in remote control of all sorts of things. Using the WiFi radio, IR, BLE, UART, etc.

  • @bobolink
    yeah, i did find the guy with the funny accent ;o) video including the skeleton file.. thanks for the link!

    I totaly agree! It might not be made with the intention to be remote controller, but it could be a nice one.

    Not sure about battery life, but there is still much to gain on that subject i guess. Screen brightness for instance will help a lot.

    I guess there are also a lot of things you could hook up on to the slider
    Like a dimmer, volume controller or even stuff like tv channels, Where a double press could be 10 up or 10 channels down. where a short press is just one.
    Or in a horizontal menu indicating where you are.

    Not sure if the ezslider bar could be re positioned or combined with a image, but i guess we will find a way.....
    Still wondering how i could do a rgb device in a easy way besides giving every color its own page.


  • Just released: M5ez 2.0.0


    • Simply install from the Arduino Library Manager..
    • But then be ready to make some changes to existing code


    From the User Manual:

    What's new in M5ez 2.x ?

    • Many user-selectable settings, including backlight, clock/timezone, FACES keyboard, etc.
    • Theme values can be changed at runtime, multiple thmes can be loaded; a theme chooser then shows up in the settings
    • Header can have user-defined widgets (internally used for clock and wifi signal display)
    • The canvas now inherits from the Print class, so everything print and println could do, you can now also do on the canvas.
    • The canvas scrolls (unless you don't want it to)
    • you can create your own events that get ran in the M5ez button wait loops
    • Many bugs got fixed
    • Code is a lot cleaner now, easier to add things without the sometimes ad-hoc and organically grown constructs of M5ez 1.x

    However, all of this comes with some changes to the names of common functions in M5ez. Generally things are more consistent now, but that does mean they are different: your M5ez 1.x code will not run without modifications. I am not planning an M5ez 3.0 at this time, so expect no further modifications to be needed to existing code for a while.

    Converting code from M5ez 1.x to 2.x

    To convert code form 1.x to 2.x, it is recommended you start by replacing the following functions:

    M5ez 1.x M5ez 2.x
    ez.clearScreen() —> ez.screen.clear()
    ez.background() —> ez.screen.background()
    ez.drawHeader( —> ez.header.show(
    ez.removeHeader() —> ez.header.hide()
    ez.clearCanvas() —> ez.canvas.clear()
    ez.canvasTop() —> ez.canvas.top()
    ez.canvasBottom() —> ez.canvas.bottom()
    ez.canvasLeft() —> ez.canvas.left()
    ez.canvasRight() —> ez.canvas.right()
    ez.canvasWidth() —> ez.canvas.width()
    ez.canvasHeight() —> ez.canvas.height()
    ez.print( —> ez.canvas.print(
    ez.println( —> ez.canvas.println(
    ez.drawButtons( —> ez.buttons.show(
    ez.getButtons( —> ez.buttons.poll(
    ez.waitForButtons( —> ez.buttons.wait(

    Then, check all your print functions: they no longer support the setting of font, location or color in the statement itself: these need to be done with ez.canvas.font, ez.canvas.color etc. (Print is much nicer now because the canvas object inherited from the Print class, and because the canvas can scroll now.)

    Then simply fix any remaining problems by first fixing any compiler complaints with this document in hand, and then walk through all of your program's functionality to see if everything works as expected.


    Please consider starring the repository: it helps people find M5ez.

  • Can any users of M5ez that are using it with an M5Stack Fire briefly report whether any LED bars display spurious behaviour? I ave one report of an LED bar staying blue, and one case (my own Fire) where they stay off.


  • Tested M5ez-demo on a Fire. Compiled with Arduino 1.8.7 with PSRAM=enabled. No issue, no Neopixel, no crackling sound during boot, everything flawlessly.
    Also the OTA Update worked. Maybe the user should try the included OTA application and exclude compiling errors by flashing your github binary?

  • @playthegame excellent report, and good suggestion to try OTA. Thanks...

  • This is Awesome! Great work!
    I'm wondering if there something similar for MicroPython?
    Or are there any plans creating a python version for M5ez?
    Would be amazing!

  • @yurikleb I haven't really played with micropython much: I built M5ez in part because micropython didn't really run well on the memory-restrained M5Stack I had. I know things ar edifferent with the Fire, and it wouldn't be crazy hard to create python bindings for M5ez. I just haven't done any python bindings before, and I'd prefer to stay focused on making M5ez better instead. But I will gladly support anyone else that feels like doing the python bindings.

    (I even had crazy thoughts of a Web-IDE where you can essentially build the entire interface in the browser, What You See Is What You Get. But seems a little ambitious and not sure how much actual use it would get.)

  • @rop Web-IDE sounds cool, have you seen the M5Flow IDE?
    It seems to be python based, and the firmware comes with a module called m5ui which has some basic UI elements you can work with, and it also has a WYSIWYG editor.
    Was trying to find the m5ui module on github but had no luck.

  • Hi! First of all, thank you for your work on this project. I am trying to use it as my very first sketch for m5stack, so I downloaded v2.0.1 and tried to load the demo from examples folder but I get a lot of errors. Is it compatible with v2.x?

  • @crazyhorse80
    What demo are you trying and what errors because im running 2.0
    (sorry @Rop I forgot to update :P )

  • @crazyhorse80 Yes, as mentioned by @ajb2k3 it would be quite helpful to know which example program and which errors.