Where is the API ?



  • Hi,
    Where is the micropython API? Namely, where can I find the content of those:

    from m5stack import *
    from m5ui import *
    from uiflow import *
    

    Among other, I would like to find the API which displays text on the eInk screen of a M5 Core Ink...

    Thanks.

    NB. I did read this which is interesting and gives a few examples, but it's not an API reference + it doesn't explain how to display on CoreInk...



  • newby here, I wonder the same and can´t believe in this forum is nothing about that.
    So am I such a total Idiot that even hours of google search doesnt point in any direction except some seconds of video footage showing a calendar booting.

    I don´t think I had ever a product with zero documentation how to set things up like M5Stack core ink.
    Brutal, very frustrting experience.



  • Have you read the document pages for the products? Each product in the store has its own document page along with guides and for UIFlow you should have found my guides on GitHub along with guides on hackster.io and video guides on YouTube



  • Here is the biggest tip I can give you
    Don’t use google as its search really sucks, it’s like an old man with dementia. I’m not fond of MS but bing search is way better at finding things and gives me answers I asked for unlike google that gives me incorrect answers it thinks I want



  • @ajb2k3 thanx for your fast answer : ) Well I found out by now that to "burn" neewest "firmware" is in fact the "must to do first" so the core is ready to be connected and works with uiflow. As a total beginner but even digging the internet (yt, google, github...) that was not clear to me, not even that there is a "burn" process. I slowly get behind the logic. Well, I am not the first one on this so I assume there is a "sticky post" or something guiding though this and I just couldn´t make it to find.



  • @ajb2k3 well google actually helped me with uiflow / blockly code images to understand how to put things together. At the moment I try to find something usefull for "deep.sleep" after some time and "wake.up" after sometime/or pressing a button (M5 CORE INK). I will get there...
    Also there is a nice "translator" from code to blockly what helps me a lot as chat gpt can write python.

    link python to blockly translator



  • Don't use ChatGPT its often wrong.



  • @ajb2k3 Yes, very true. anyway it helps me alot to understand and pointing in the right direction. I created a few scripts allready with this I otherwise would never be able to script. So, a big help to me at last. As I mentioned I have Ideas and cases but I am affraid I wont learn propper coding.
    So I simply rely on try and error, google and chat gpt. thats my reality.

    And the Forum is a help too, of course : )
    I will try your suggestion about "Bing" as this is A.I. now. In the past that search engine was never of any good help for me, I am affraid.

    cheers
    EBK



  • This page contains the core Micropython API (if you use UIFlow which is built on micropython) https://docs.micropython.org/en/latest/esp32/quickref.html

    If you are on Facebook, in the M5Stack page, I have just uploaded an Update to the UIFlow 1.x doc



  • @ajb2k3 perfect thank you : )



  • I had the same question...
    Coming from the adafruit world and Circuitpython, I'm used to having a reference like this https://docs.circuitpython.org/en/latest/shared-bindings/index.html (which is very comprehensive and a lot of work)

    UIFlow does seem pretty easy to understand, even without documentation.
    But when I do something in micropython like

    import unit

    What am I actually importing? is source code available?



  • No source code but Updated documentation is uploaded weekly to the Facebook group for preview.

    Every product has a documentation page with demos and programming guides are found on the M5Stack site under Documentation.



  • I totally agree with the OP!
    A proper API documentation would be appreciated (Hope someone from M5Stack is looking here)

    Maybe slightly off topic but:
    I also don't like UIfLow with its strange and unnecessary complicated "cloud connection" to be able to program the devices and it becomes incredible difficult to work with as soon as you slightly increase the complexity of your programs, but when I program my M5stack units directly in Micropython with Thonny I use UIFLow (offline) as a kind of API to find functions in the main M5Stack libraries mentioned by the OP (m5stack, m5ui, uiflow ).

    A further tip:
    In Micropython (like in Python) you can always inspect any library with
    help(<library_name>) or dir(<library_name>)
    At least this will give at list of objects that may hint you to available functions.

    By the way, does anyone know of release note for the M5Stack Micropython binaries?
    There is quite often a new release but there is no info about bug fixes new features etc.



  • Hi @cognitive5525,

    Were you thinking more like a M5Stack reference rather than how-do document? I would love that.

    Maybe like this
    https://docs.m5stack.com/en/uiflow/hardwares/microphone
    with further breakdown of each function with syntax and parameters in MicroPython code.

    Have you tried using Visual Studio Code to program devices directly? I might try Thonny because I need something that works across macOS, RPi and Linux. VS Code was ideal, and I have been using it, but I couldn't "add device" when I tried on macOS today.



  • If you use and IDE like thonny you can directly access Micropython and use the function help. I have been looking and recording them but as I work it has been slow going (especially when things break) and I have been releasing updated documentation weekly but I have been away for a while.

    I have also been busy the last few weeks uploading getting started videos to youtube



  • @gavin67890 said in Where is the API ?:

    Hi @cognitive5525,

    Were you thinking more like a M5Stack reference rather than how-do document? I would love that.

    Maybe like this
    https://docs.m5stack.com/en/uiflow/hardwares/microphone
    with further breakdown of each function with syntax and parameters in MicroPython code.

    Yes a reference as you'll find for the stock Micropython. Tutorials or Howtos are also find but usually only in the very beginning.

    Have you tried using Visual Studio Code to program devices directly? I might try Thonny because I need something that works across macOS, RPi and Linux. VS Code was ideal, and I have been using it, but I couldn't "add device" when I tried on macOS today.

    I tried it once or twice with VS some time ago, but I couldn't get the plugin work well. It was difficult to establish a stable connection to the devices.

    I had to tweak Thonny though:
    https://community.m5stack.com/topic/5268/micropython-for-atom-s3-lite/4