M5ez, a complete interface builder system for the M5Stack as an Arduino library. Extremely easy to use.
-
@how Thank you for trying it.
You might want to update your ESP32 library: they changed how WPS is done. I found my somewhat older library caused all sorts of underlying little problems that have all been fixed. Wifi is more stable and doesn't error all the time, etc etc.
I just moved my old $arduinodir$/hardware/espressif/ESP32 directory and re-followed the instructions on https://github.com/espressif/arduino-esp32/
Please let me know if this works...
I'll put a note of this in the README anyway.
-
Ha. even better. I noticed the changes they made are relatively recent: end of June 2018. So that means lot of people will have the incompatible library. Rather than have it not work out of the box for all these people, I have turned off WPS by default, you have to remove
#define M5EZ_WITHOUT_WPS
in theM5ez.h
file to use the code, and then if you notice it doesn't work the docs tell you how to fix it... -
Hello Rop,
thank you very much for your quick answer and the "patch".
Now it compiles (with old esp32 libary)
It works perfect, great work!
Have a nice day. -
Hi Rop,
I have another request ...
An NTC or RTC Clock service (or both) can be incorporated ...
For many applications it is necessary to know the clock time.It would be ideal to synchronize the clock via NTC every time you connect to a new Wifi, and / or also every so often (every 2 hours, every day ...)
As I have been able to read, the ESP32 has RTC, but is made for the internal synchronization process, and has poor accuracy. https://www.esp32.com/viewtopic.php?t=3715
A solution seems to be here:
You can set the time in the same way as in the example
ESP8266 / NTP-TZ-DST
(see constant RTC_TEST) (it is the time of time - seconds since January 1, 1970), for this you can use two or three buttons (SET, + or / and -) and a screen, as in many clocks and appliances. -
@how Thank you for using M5ez.. :)
You still want to switch to the latest library version though: other things (esp. Wifi) are much more stable with it.
-
@janseta Thanks...
Some things are on my list:
- an inactivity timeout to power down if not using it
- backlight setting
Both would be stored in flash and settable from a settings menu that also incorporates the Wifi menu, so create a new linkable "Settings" menu a level higher. I guess I can also include an NTP clock, I'll see..
-
You can use nvs wrapper "preferences" for storing values that must survive reboot and even flashing: https://github.com/espressif/arduino-esp32/tree/master/libraries/Preferences
Also Arduino-esp32 provide an integrated NTP library: https://github.com/espressif/arduino-esp32/tree/master/libraries/ESP32/examples/Time -
@calin Hi Calin. I already use Preferences in the new wifi code to store the SSIDs and passwords and a general flag whether autoconnect is on. Thanks for the NTP pointer...
-
Just got my m5
I am novice on programming and got it working!
awesome..Also love the example file with the systeminfo,
i hope to make a mqtt remote out of it and this should make it possible for me!Also got a question/request: it is possible to make the menu rotating? so last one down, will be the 1st one up?
offtopic
some how the quarter just falls here, something with old phone booths and dtmf beepers. lol -
I am novice on programming and got it working!
awesome..Cool! People like you are why I wrote it: programming needs to be easy and fun so more people get into it!
Also love the example file with the systeminfo,
i hope to make a mqtt remote out of it and this should make it possible for me!mqtt looks cool! If you're going to use the FACES keyboard, you will probably need
ez.textBox
, which I have on the drawing board. It will allow for both entry and display of longer texts.Also got a question/request: it is possible to make the menu rotating? so last one down, will be the 1st one up?
I am currently testing features where you can replace up/left at the beginning or right/down at the end with a button name and caption of your choosing. Combined with the two new reserved button names 'first' and 'last', you can do that as well as lots of other clever tricks. (Like exit back out of a menu very easily, or make 2-D seeming menus by having the main image menu be horizontal and submenus (text or image) be vertical. So that's coming...
offtopic
some how the quarter just falls here, something with old phone booths and dtmf beepers. lol:)
-
@r_255 I just added the feature that allows menu rotation to the repository.
upOnFirst
anddownOnLast
properties can replace those navigation buttons with whatever you want. In fact, the main menu in the demo app now rotates, so you can see how it's done there, or in the README documentation for details.Also: I changed around how
MAIN_DECLARED
works in the examples: it is now defined astrue
orfalse
meaning you can just use its value from code instead of needing variables or#ifndef
lines. -
Omg, you have been busy... :)
I am not going to use the keyboard, even it looks nice...I need stuff ( remote ) to be plain simple as i have to deal with people that hold the mouse upside down.
so 3 buttons is more than enough ;) for this purpose.i am off to github doing some exercises and read some code.
big thanks and a huge smile !
-
Just released 1.0.0 as I think it's pretty stable. Also I applied to have M5ez included in the Arduino library manager.
-
I just released version 1.1.0 of M5ez. It adds
ez.textBox
to display or edit longer word-wrapped texts.ez.msgBox
now wraps and justifies, so you don't have to figure out how much fits on a line. And there's a dark theme added to the themes directory. -
@rop
Rop,
Great work. Professional appearance.
Can you offer any guidelines for preparing jpg images as a C array?
I’ve tried various on-line and command line converters but no image appears.
Thanks -
@bobolink I haven't tried to convert any images myself, I have just taken the ones from Calin's code. I have been busy getting the new version out. I'll have a look at possibly creating a tool (or even an online tool) for this.
-
Just released: version 1.2.0 of M5ez.
-
It adds the
ezProgressBar
class to (you guessed it) show a progress bar while also offering all the word-wrapping niceties ofez.msgBox
. -
ez.update
lets you specify an https URL to download a new binary from. And this wouldn't be M5ez if all of that wasn't extremely easy. the/tools
directory of the repository has a shell script that people here might find handy even if they don't use M5ez. (But why on earth would you not use M5ez? :) ) -
The script,
get_cert
, takes an https URL as an argument. It will follow any redirects, output the resulting "effective URL", get the certificate chain, take the last cert from that, and make an include file that holds the root cert, ready to be used in your sketch. Below is an example.
your_prompt$ ./get_cert https://github.com/ropg/M5ez/blob/master/compiled_binaries/M5ez-demo.bin?raw=true The effective download URL (after resolving forwards) is: https://raw.githubusercontent.com/ropg/M5ez/master/compiled_binaries/M5ez-demo.bin The root certificate include file is saved as: raw_githubusercontent_com.h
- and then that file would contain:
// This is the root certificate include file for raw.githubusercontent.com // as obtained by the get_cert script on: Wed Aug 15 21:34:20 CEST 2018 // // // Certificate info: // issuer= /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV Root CA // notAfter=Oct 22 12:00:00 2028 GMT // const char* root_cert = \ "-----BEGIN CERTIFICATE-----\n" \ "MIIEsTCCA5mgAwIBAgIQBOHnpNxc8vNtwCtCuF0VnzANBgkqhkiG9w0BAQsFADBs\n" \ "MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\n" \ "d3cuZGlnaWNlcnQuY29tMSswKQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5j\n" \ "ZSBFViBSb290IENBMB4XDTEzMTAyMjEyMDAwMFoXDTI4MTAyMjEyMDAwMFowcDEL\n" \ "MAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3\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Kj4PWUS+Na0QWnqxj9dJubISZi6qBcYRb7TROsLd5kinMLYBq8I4g4Xmk/gNH\n" \ "E+r1hspZcX30BJZr01lYPf7TMSVcGDiEo+afgv2MW5gxTs14nhr9hctJqvIni5ly\n" \ "/D6q1UEL2tU2ob8cbkdJf17ZSHwD2f2LSaCYJkJA69aSEaRkCldUxPUd1gJea6zu\n" \ "xICaEnL6VpPX/78whQYwvwt/Tv9XBZ0k7YXDK/umdaisLRbvfXknsuvCnQsH6qqF\n" \ "0wGjIChBWUMo0oHjqvbsezt3tkBigAVBRQHvFwY+3sAzm2fTYS5yh+Rp/BIAV0Ae\n" \ "cPUeybQ=\n" \ "-----END CERTIFICATE-----\n";
Does that make life super ez or what?
If you want, please check out the project github as well as the step-by-step description of how to use
get_cert
andez.update
. The OTA functionality is shown in the project demo app downloading via https from github and everything is documented rather nicely if I may say so myself. :) -
-
@rop 在 M5ez, a complete interface builder system for the M5Stack as an Arduino library. Extremely easy to use. 中说:
@bobolink I haven't tried to convert any images myself, I have just taken the ones from Calin's code. I have been busy getting the new version out. I'll have a look at possibly creating a tool (or even an online tool) for this.
Open the file on HexWorkshop -> CTRL+A -> Edit -> Copy As -> C Source
Open the header file -> Paste :) -
@bobolink There is now an
include_file
script (here) in the/tools
directory of the M5ez repository. If you get it, make it executable withchmod a+x include_file
and run it with a file as an argument, like:your_prompt$ ./include_file settings.jpg Converting input file: settings.jpg Creating include file: settings_jpg.h
That include file then contains:
#pragma once // // Include this file to use settings.jpg (1087 bytes) in your sketch. // // File created on Thu Aug 16 11:39:50 CEST 2018 // Made by the include_file script that is part of // "M5ez: the easiest way to program on M5Stack." // https://github.com/ropg/M5ez // const char settings_jpg[] PROGMEM = { 0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46, 0x49, 0x46, 0x00, 0x01, 0x01, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0xff, 0xe1, 0x00, 0x8c, 0x45, 0x78, 0x69, 0x66, [...] snip [...] 0x35, 0xf4, 0x0a, 0x6e, 0x75, 0x6b, 0x92, 0xab, 0xf6, 0x8b, 0x8d, 0x91, 0x79, 0x3e, 0x50, 0x8e, 0x30, 0xbb, 0x49, 0x90, 0x03, 0xff, 0xd9 };
Once this file is included, you can then provide the
settings_jpg
as the first argument toez.addItem
if you are adding an item to an image menu. -
@rop Thank you. I’ll check it out.
I think this is HexWorkshop mentioned above. .EXE for Windows.