Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. AhmadAgb
    A
    • Continue chat with AhmadAgb
    • Start new chat with AhmadAgb
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups
    Save
    Saving

    AhmadAgb

    @AhmadAgb

    0
    Reputation
    6
    Posts
    334
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    AhmadAgb Follow

    Posts made by AhmadAgb

    • M5Stack LVGL, Any Documentation?

      I was looking at: https://docs.m5stack.com/en/mpy/display/m5stack_lvgl on which provides few examples on how to draw on my CORE2 display using MicroPython.

      While it provides few examples, in my case it's not enough at all. Few things I'm interested in (Kindly relate to all sub-questions in your answer):

      1. As an example, How can I look at the inner implementation of: M5Textarea? I would like to see which parameters each function takes, which of them are optional, how it's implemented (so I can write something similar) etc...

      2. I want to write a new class deriving from Element Base Class: M5Obj How can I do that without knowing how the base class is implemented?

      3. Where can I find the full list of Objects? From my experience I've discovered few which aren't mentioned in that page at all. For example, I want to see how can I draw a graph.

      4. I found the following function which draws rectangle on the screen:

      temp = lcd.triangle(19, 10, 300, 40, 90, 200, color=0xcc0000)
      

      which doesn't return anything, ie temp is a NoneType Object, In this case how can I delete that rectangle? as I don't have a reference to M5Obj Object I can't write temp.delete()

      Note: I can't just color the whole display in white as there could be complex elements in the background.

      posted in Core 2
      A
      AhmadAgb
    • RE: M5Stack Core2, How to load Custom Font?

      I'm not seeing any error message, the device just restarts.
      I've tried to use the following code instead (without calling lcd.font):

      lcd.compileFont("./valera.c")
      label0 = M5Label('Hi', x=149, y=86, color=0x000, font=valera.fon, parent=None)
      

      While it doesn't cause restart the font isn't working (I've tried to search the generated files and compileFont doesn't seem to produce any .fon file, which shouldn't be the case)

      Side Note: my input .c file is less than 100 KB in size, as larger files caused crashes according to the comments in previous posts.

      posted in Core 2
      A
      AhmadAgb
    • M5Stack Core2, How to load Custom Font?

      I was reading: https://community.m5stack.com/topic/388/cahnge-font-size-in-python/ on how to load custom font on my Core2 Board and tried to do it myself.

      Given font file in .ttf format, I've generated 2 files: in .c and .bin format using the following online tool: https://lvgl.io/tools/font_conv_v5_3

      Then, I moved them to my Core2 Board and tried to use the new font like this (I'm working with MicroPython):

      from m5stack import *
      from m5stack_ui import *
      from uiflow import *
      from valera import *
      
      screen = M5Screen()
      screen.clean_screen()
      screen.set_screen_bg_color(0xFFFFFF)
      
      
      label0 = M5Label('Hi', x=149, y=86, color=0x000, parent=None)
      lcd.compileFont("./valera.c")
      lcd.font("./valera.c")
      

      But, every time I run the above code the program crashes and causes a restart to the device.
      Any suggestions on what could be the problem here?

      posted in Core 2
      A
      AhmadAgb
    • Copy/Paste not Working

      On the latest version of UI Flow Desktop IDE for macOS, copy and paste doesn't work at all.

      posted in Bug Report
      A
      AhmadAgb