Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. erich
    3. Posts
    E
    • Continue chat with erich
    • Start new chat with erich
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by erich

    • RE: Infrared on the M5StickC+ and UIFlow, is it me or?

      Hi Gavin,

      I moved on to some other projects and did not have time to come back to this one yet (even though I would really like to achieve something with IR + M5StickC+).
      I found a 3rd party IR library on the internet but it was quite a challenge to integrate it to the M5 ecosystem....work in progress but not much time at the moment.
      I'll keep you posted as I resume my work on this.

      posted in M5 Stick/StickC
      E
      erich
    • Infrared on the M5StickC+ and UIFlow, is it me or?

      Hi all,

      I am generally coding with VSCode / PIO in C but with a M5StickC+ hanging around I wanted to develop an idea with a small battery powered device to replace some of my tools
      The idea is to run multiple programs on the stickc to do various things like measuring distance, send IR codes, identify IR from any remote control etc...
      In fact I have already built a small project with an arduino and an IR receiver (KY-022 module) few years ago able to recognise a big amount of IR standards (NEC, SAMSUNG, etc...) and their HEX/DEC code using an easy library found on the internet....it is working like a charm and I have been able to recognise the standard use for all the remote controls I have tested so far.

      Well long story short I'd like to replace it because it is bulky, 9V battery powered, using old fashion LCD display etc...
      This was the opportunity for me to start looking at UIFlow.

      I could get ready quite fast and I guess I understand now most of the features.
      However I have been VERY VERY disappointed by the limited (to say the least) features....
      I know the Stickc+ only has a Tx IR, not Rx but still, this is a joke, only limited to NEC standard and that's it? or I am missing something.

      Anyway I purchased the IR Remote module from M5Stack and same joke, on the IR Rx you can only acknowledge a signal has been received...and it is not working with any remote I have tried (not a range issue, I was 10cm from the module)...no possibility to change from NEC either....
      This module is totally useless...at least with the default UIFlow

      Now I am trying to come back to my trusty KY-022 plugged on StickC+ GPIO but I need external libraries.

      I understand you can load external lib.py files on the stickc+ memory and load them with Execute module.
      Then I guess I should create some Custom blocks to include the code from the lib and extend the IR functionalities?

      Do you think this is the right way to do it in UIFlow, does someone have any experience with external micropython IR libraries in UIFLow?

      Thanks a lot!
      Eric

      posted in M5 Stick/StickC
      E
      erich
    • RE: IoT with M5Stack and UIFlow is now live!

      Great! looking forward to it!

      posted in General
      E
      erich
    • RE: IoT with M5Stack and UIFlow is now live!

      Nice! Do you have any idea which topics you'd like to touch on for the next volumes?

      posted in General
      E
      erich
    • RE: How to run LVGL on M5Stack

      I'm struggling with edgline but just realized the code which is automatically generated is not compatible with LVGL 8.x, only version 7.
      Looks like they have not updated the tools since a while, not even sure if they still want to maintain it.
      I am going back to old school manual coding...I don't mind writing lines of code but I am bad at designing UIs and EdgeLine seemed to be my savior (but not anymore unfortunately)

      posted in PROJECTS
      E
      erich
    • RE: How to run LVGL on M5Stack

      @jackrazors Thanks for sharing!

      posted in PROJECTS
      E
      erich
    • RE: How to run LVGL on M5Stack

      @got thanks, I will for sure ;)

      posted in PROJECTS
      E
      erich
    • RE: How to run LVGL on M5Stack

      Great, I'm glad it works for you!
      I don't feel I did much to help but anyways here is my GH account: https://github.com/erich74
      At the moment I juste have a couple of private reps but I am planning to add public stuff when I get more used to M5Stack devices as this is becoming my main development/iot device platform.
      I will come back to this thread as I will probably need some help when I progress with my current project ;)

      posted in PROJECTS
      E
      erich
    • RE: How to run LVGL on M5Stack

      @macsbug you're right, I did mention using TFT_eSPI instead of M5.Lcd only for portability reason.
      I would like to create a set of sample files that I can use with any display and not only with M5Stack devices.

      posted in PROJECTS
      E
      erich
    • RE: How to run LVGL on M5Stack

      Hi Pierre,

      Sorry I don't feel I did much for you but my (real) work is really taking much of my time (even what is supposed to be my free time) and I wish I could have spent more time working this out with you.
      In any case my offer still stands, I can help you building up a simple template with comments for people to get started.
      I already spent much time on it and I believe I have understood all the basic concepts .
      As already said, now i need to go one step further with event management.
      Also I am quite used to code in C (this is the language I started with a loooong time ago) I am not an expert but at least I can understand the most of what I do :)
      Btw a good platform that I have adopted now since several months is VSCode + PIO...Very neat combination!

      posted in PROJECTS
      E
      erich
    • RE: How to run LVGL on M5Stack

      Honestly I started off reading the LVGL online help and even though I am still learning I did not have much problem making the lib work on the Core2.
      However I spent some significant time before understanding the whole concept (probably because I am getting too old :) ) and you seem to be way more experienced than me so you will make it work quickly :)

      My GitHub project is private (because it might end up being commercially used) but if you want I can extract the minimum code I used to display something if it can help and make it public.

      By looking at the error (If I remember I got more or less the same) this looks like invalide pointer / memory allocation.

      I realized that just initializing everything for LVGL to work is a real pain (when you've never played with it) but after you've understood the basic concepts it comes much clearer.
      At this stage all basic things are working fine I am now moving on to Event management (button press, sliders move etc...).

      Btw you can also have a look at the EdgeLine application which is a kind of LVGL companion allowing you to WYSIWYG to C/Python code automatically for you. I am very bad at designing UIs so I am starting using it for my project and it can also help you understand the code which is generated.

      posted in PROJECTS
      E
      erich
    • RE: How to run LVGL on M5Stack

      @got said in How to run LVGL on M5Stack:

      lv_conf.h

      btw as you've already guessed, you have to tweak the lvgl_conf.h file otherwise it won't probably work out of the box

      posted in PROJECTS
      E
      erich
    • RE: How to run LVGL on M5Stack

      lol I'm from Toulouse :)

      Yes I am using version 8, what makes you think otherwise?
      I'll have a look at your GitHub files ;)

      posted in PROJECTS
      E
      erich
    • RE: How to run LVGL on M5Stack

      I did not take the same approach because I am not using the M5.Lcd class but TFT_eSPI
      What I understand is that M5.Lcd is also based on TFT_eSPI but M5Stack did their own implementation.
      As I want full portability on my other displays and ESP boards I decided not to use M5.Lcd.
      However it should work in your case.
      From what I see you are missing several initialization steps and I guess this is the reason why it is not working

      Here is a sample you can use:

      #include "M5Core2.h"
      #include "lvgl.h"
      #include "MyLVEventHandler.h"

      #define DISP_HOR_RES 320
      #define DISP_VER_RES 240

      TFT_eSPI tft = TFT_eSPI(DISP_HOR_RES, DISP_VER_RES);

      static lv_disp_draw_buf_t draw_buf;

      void tft_lv_initialization()
      {

      lv_init();
      
      static lv_color_t buf1[(DISP_HOR_RES * DISP_VER_RES) / 10]; /*Declare a buffer for 1/10 screen size*/
      static lv_color_t buf2[(DISP_HOR_RES * DISP_VER_RES) / 10]; // second buffer is optionnal
      
      lv_disp_draw_buf_init(&draw_buf, buf1, buf2, (DISP_HOR_RES * DISP_VER_RES) / 10); // Initialize `disp_buf` display buffer with the buffer(s). With only one buffer use NULL instead buf_2
      
      tft.begin();        // TFT init
      tft.setRotation(1); // 1=horizontal 3=upside down 0=left 2=right
      

      }

      // Display flushing
      void my_disp_flush(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p)
      {
      uint32_t w = (area->x2 - area->x1 + 1);
      uint32_t h = (area->y2 - area->y1 + 1);

      tft.startWrite();
      tft.setAddrWindow(area->x1, area->y1, w, h);
      tft.pushColors(&color_p->full, w * h, true);
      tft.endWrite();
      
      lv_disp_flush_ready(disp);
      

      }

      void init_disp_driver()
      {

      // Initialize the display
      static lv_disp_drv_t disp_drv;     /*Descriptor of a display driver / //disp_drv.full_refresh = true;  direct mode can also be set true*/
      lv_disp_drv_init(&disp_drv);       /*Basic initialization*/
      disp_drv.flush_cb = my_disp_flush; /*Set your driver function*/
      disp_drv.draw_buf = &draw_buf;     /*Assign the buffer to the display*/
      disp_drv.hor_res = DISP_HOR_RES;   /*Set the horizontal resolution of the display*/
      disp_drv.ver_res = DISP_VER_RES;   /*Set the vertical resolution of the display*/
      lv_disp_drv_register(&disp_drv);   /*Finally register the driver*/
      

      }

      posted in PROJECTS
      E
      erich
    • RE: How to run LVGL on M5Stack

      @got would you share some code sample so that we can have a look?
      I am not an expert at all but i can try helping you.

      posted in PROJECTS
      E
      erich
    • RE: How to run LVGL on M5Stack

      Hello,

      Same here, I have started from scratch with LVGL 8.1 / VSCode / PIO
      Still learning a lot but so far so good :)

      posted in PROJECTS
      E
      erich
    • RE: Looking for Factory Test Source code for Core2

      Hello,

      Just to be sure this is not a problem with your unit, I would suggest you download the EasyLoader tool you can find the link on this page: https://docs.m5stack.com/en/core/core2

      This tool allows you burning your Core2 with the stock demo program so that you can test it without having to compile it.

      Should be a good start

      posted in Core 2
      E
      erich
    • RE: Any experience with Core2<>LVGL lib ?

      Just answering to myself :)

      I spent the whole day digging into LVGL lib on the Core2.
      I must say there's a huge learning curve for me (I'm just a hobbyist with just average knowledge).

      I initially thought it would be very easy to use but this is definitely not the case (again, for me).
      However I am happy because I guess I have understood the basic concepts and I was finally able to diplay objects like buttons or sliders on the screen and interact with the touch display.

      This library is incredibly powerful. The fact that I am playing with others devices than M5Stack stuff motivates me to keep on investigating as I will be able to use it on almost any other screen devices.

      Would be great to use this post if you want to share your experience with LVGL and the Core2.

      posted in Core 2
      E
      erich
    • RE: M5STACK CORE 2 SOUNDS

      @ajb2k3 As I mentioned in the other post my code is written in C (VSCode + PIO) however I would like to try Micropython for my next project M5Stuff project :)
      Can you please tell me more about your guide? Is it possible to buy it somewhere? is it the same as what is mentioned in your signature: UIFlow handbook? I would be very much interested, thanks!

      posted in Core 2
      E
      erich
    • RE: How to Generate a Beep?

      @ajb2k3 Thanks for the tip. Unfortunately it is not that easy when not using UIFlow.
      I am using VSCode + PIO with the Arduino framework

      posted in Core 2
      E
      erich