M5ez, a complete interface builder system for the M5Stack as an Arduino library. Extremely easy to use.
-
I tried to put this line MyTZ.setlocation("Europe/Rome") in my setup() function, but I get an error:
error: 'MyTZ' was not declared in this scope
MyTZ
has to be declared first. If you putTimezone MyTZ
outside of any functions (in the "global scope") it should work.More generally: using objects from my libraries works because they are declared in the
ezTime.h
andM5ez.h
files and then implemented in the respective.cpp
files. I would stay away from creating your own objects at this point. You don't need them: simple functions within your own sketch would work and are easier to understand. Simply put theheader.add
in yoursetup()
(afterez.begin()
), and point to a regularvoid
function that takes twouint16_t
parameters for drawing the widget.(If you do want to use a class, you'll have to make it static, because otherwise you cannot point to the draw function. But really, just use a regular function.)
-
@rop I thought MyTZ object was already declared in your library, my fault.
Thank you for your explanation about objects. I misunderstood your previous directions and I thought I must use them to the widget to work. It seems it was a lot easier to do than that! The widgets I need to display are really simple, just a small text or icon reflecting the state of some variable's value, so I think a regular function will work. I'll try one more time. ;) -
@rop, M5ez is awesome - thank you for the enormous amount of time you put into it!
I'm trying to use Blynk to receive events from another board. I have gotten events to show on the M5 in a simple standalone program, so I know it "works". Within M5ez, I believe I just need to call Blynk.run() with the ez.addEvent function, as Blynk.run needs to run often as possible - in most of my projects it's usually the only thing in the main loop, but I'm unsure of how/where to use the ez.addEvent function. There aren't any examples of ez.addEvent in the Demo or any of the other examples included with the library. Any help on syntax and where to put that statement?
Thanks again for your time!!!
-
@brianr It depends on the rest of your program, but normally you would place it in
setup()
. Then make sure the event function returns1
to run as often as possible. What that means is that you cannot provide Blynk.run() directly but must make your own function that runsBlynk.run()
and returns auint16_t
of value1
This needs to be more convenient, I know.
addEvent()
needs another go-over, better documentation and examples, will put that on the list. -
Ah yes, success! I added
ez.addEvent(run_Blynk);
to thesetup()
, and then created a function down below, after the loop, that looks like the following. It's worth noting that I'm using the M5 as a "receiver" from a bridge, thus the blynk_write(V1) statement.uint16_t run_Blynk() { Blynk.run(); return 1; } BLYNK_WRITE(V1){ eventData = param.asString(); }
That did the trick, Blynk connects and stays connected. Now trying to figure out how to display the dynamic data from Blynk on the canvas. If I figure this all out, I'll write a short demo in a new topic for others, as I haven't seen many examples of actual use of M5ez, other than the demo program, but most projects are more than just menus, they have to display something... Again, @rop, excellent work, and thanks again so much!
-
I really like M5ez so I gave it its own core. Justified it by saying that’s real MVC architecture! Real Computer Science stuff.
/*
GLOBAL INFO
core 0 is the communications processor.
Uses the ESP-NOW protocol
on the 2.4 GHz radio
This process runs as a task created
on core 1
core 1 is the UI processor.
Maintains the M5Stack M5ez LCD menu
Runs Arduino setup() and loop()
*/
Use RTOS semaphores when accessing the global vars to/from the local versions. -
Hello,
Is there a chance to change font (or size) of ez.header ?
Regards, M
-
Looks great! Does it play well with PlatformIO ?
-
Great Job
-
@Rop is M5EZ supporting the Stick C?
I have had a query from the Facebook group. -
No it does not: it only works on the 3-Button M5Stack devices.
-
@rop Any intention of a stick version?
-
@brianr @rop Hey guys, thanks a lot for this very elegant solution, I´m using the ezMenu library in a program where I had installed Blynk working very well but everytime when I activated the ezMenu with mainmenu.run(); my Blynk app was very unstable, with the trick of ez.addEvent(run_Blynk) in the setup() function now is working very well, thanks for the help
-
Hi,
great project.
It is possible to use the face encoder for up, down and enter?
if yes, you have an example?
this will be great -
This post is deleted! -
Hi,
It is great using the M5EZ!
But I want / need to give my Core a static IP address. Is there an easy way to alter the Wifi settings menu and add the option of adding static ip? Maybe In such a way it is stored in the preferences?kr, G
-
Hi,
I wanted to know if there is a way to use faces keyboard in the menus (i.e. I have the calculator keyboard and instead of using the three buttons to go up and down and select, I want to use the keys on the face, for example for selecting first line I will type on the key '1' and so on).
and if it is possible, can you give me an example of code using it.
Thanks -
How do i get the characters for my region such as the pound sign £ ?