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

  • 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.


与 M5Stack Community 的连接断开,我们正在尝试重连,请耐心等待