Navigation

    M5Stack Community

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

    Posts made by Paulskpt

    • M5Stack boards package for Arduino causes compile errors

      Hello,

      On Friday 2022-12-02 on a desktop PC with MS Windows 11 Pro, and runing the Arduino IDE v1.8.19, a sketch
      for a M5Stack Core2 would not compile while this sketch built successfully on 2022-04-24.

      To investigate the problem, I turned on 'File > Preferences > Show detailed messages during compilation'.

      I discovered that the name of the folder of the M5Stack board package contained a '+' character (ASCII decimal value 43, hexadecimal value 2B).
      The compiler reported that it could not find (the) file(s). (see below).

      There are some sources that describe the limitations of which characters can be used in the Microsoft Filesystems.
      For example:
      a) Naming Files, Paths and Namespaces;
      b) Wikipedia Filename.

      As far as I understand it: for the current Microsoft filesystem, NTFS, the '+' character is not a 'reserved character'.
      That is probably why there is no error generated when installing the M5Stack board package with the '+' in the name,
      however source b above mentions limitations in FAT12, FAT16 and FAT32 file systems. See the text in the most right column,
      the text I marked with an orange rectangle. Here the '+' character is listed as 'reserved character'. In other words: one cannot
      use the '+' character in file or folder names for these file systems:
      FAT12, FAT16 and FAT32 reserved characters.

      Despite a successful install of the M5Stack board package, the compiler was not able to find files because of
      the '+' character in the folder name.

      Fortunately I was able to install the package with version ID: '2.0.5-1.0'. Next I was able to delete the package with version ID: '2.0.5+1.0'.
      After this correction the sketch compiled and built successfully (again)

      Here the last part of the build session with the compile error:
      compile error

      The offending folder location and name was:
      C:\Users<User>\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\2.0.5+1.0

      Today, when using the newest version of the Arduino IDE (version 2.0.3), I was asked to update a boards package from M5Stack.
      While the version 2.0.5-1.0 was installed, the Arduino IDE suggested me to install the M5Stack version 2.0.5+1.0. Again the version
      with the '+' sign in the version (and sure, the folder name too). With my previous experience I did not install the proposed update. (See the partial screenshot below):

      Arduino IDE v2 M5Stack package update

      Maybe I address the wrong persons with this post.
      Perhaps I should report this problem to the maintainer(s) of the compiler used in the Arduino IDE.

      Can I ask the moderators of this M5Stack forum to look into the matter and take corrective measures, if you think that is necessary?
      Thank you.

      posted in Arduino
      P
      Paulskpt
    • Not M5Stack product but 'family' ESP32-S3-Box MSFS2020 GPSout GPRMC and GPGGA data to 'esp-box'

      The Espressif ESP32-S3-Box is a product that looks like some M5Stack products. I own quite a bunch of M5Stack products. When the Espressif ESP32-S3-Box (V 2.5) came out, I bought it. It was my intention to port my ongoing MSFS2020 GPSout project to the 'esp-box' (the (nick)name that Espressif uses for this device). It was until last weekend when through @Neradoc and @hathach, the maintainer of Adafruit tinyuf2 bootloader repo, on my request, had added the 'esp-box' to the list of boards compatible for the tinyuf2 bootloader. From that moment I was able to build a tinyuf2 bootloader firmware for the 'esp-box'. When that was done, I was able to copy the latest version of CircuitPython (V8.0.0-beta.2) to the device. Finally I was able to port my project to the 'esp-box'.

      That is why I created this post here so you can read about the existance of my project. See my repo on Github.
      GPS data on esp-box

      Below some REPL output:

      soft reboot
      
      Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
      code.py output:
      ]0;🐍Wi-Fi: off | code.py | 8.0.0-beta.2\
      loop(): my_machine= "ESP32-S3-Box-2.5 with ESP32S3"
      
      MSFS2020 GPS GPRMC data reception decoder script by @PaulskPt. 
      
      Number of loops in this run: 99
      ........................
      
      Start of loop 1
      ck_uart(): nr of bytes=  120
      ck_uart(): rcvd data: bytearray(b'$GPRMC,215807.00,A,5837.7935,N,13810.7771,W,164.0,319.8,161022,18.2,E*72\r\n$GPGGA,215807.00,5837.7935,N,13810.7771,W,1,05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
      ck_uart(): nr of bytes=  33
      ck_uart(): rcvd data: bytearray(b',0.0,4266.7,M,0.0,M,0.0,0000*51\r\n810.7771,W,164.0,319.8,161022,18.2,E*72\r\n$GPGGA,215807.00,5837.7935,N,13810.7771,W,1,05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
      ck_uart(): nr of bytes=  153
      ck_uart(): rcvd data: bytearray(b'$GPRMC,215811.00,A,5837.9408,N,13811.0171,W,164.0,319.6,161022,18.2,E*76\r\n$GPGGA,215811.00,5837.9408,N,13811.0171,W,1,05,0.0,4266.7,M,0.0,M,0.0,0000*5B\r\n\x00\x00\x00\x00\x00\x00\x00')
      ck_uart(): * at -11, $GPRMC at 0, $GPGGA at 74, n4 =114
      loop(): characters rcvd:  153
      loop(): split_types() result = True
      is_ac_stopped():  value of gs = 164.0, len(gs) = 5
      is_ac_stopped():  value of v_gs = 164
      loop(): handling msg nr: 01
      lcd_pr_msgs(): Duration rx -> lcd: 241 mSecs
      loop(): gc.mem_free()= 8148128
      Waiting for serial com line to become available...
      End of loop  1
      ........................
      

      Note: because the 'terminalio.font' doesn't have a glyph for the 'degrees' character I used the caret '^' instead,
      until I have added a font that can display the degrees character.

      For some other microcontroller i have ports of the same project on Github.

      posted in PROJECTS
      P
      Paulskpt
    • RE: M5Stack D3231 uRTC module

      PROBLEM SOLVED

      At startup :
      if flag 'power_lost' is True:
      the external DS3231 is set with pre-determined datetime (adjust by hand)
      next the built-in RTC is started with the datetime from the DS3231

      if the flag 'power_lost is False:
      the built-in RTC is started with the datetime from the DS3231

      During the main loop displaying the datetime from the built-in RTC.

      I put a short video in the images folder inside the dropbox folder (see the link in my post above).

      posted in General
      P
      Paulskpt
    • RE: M5Stack D3231 uRTC module

      I have some experience with programming RTC modules but this problem I am not (yet) able to solve.

      Is there anyone who read my post above and has looked into the code to see if he/she can give me a hint
      to solve this problem of RTC not updating ?

      See my tweet in May 2021:

      tweet in may 2021.

      posted in General
      P
      Paulskpt
    • RE: M5Stack D3231 uRTC module

      Troubleshooting

      The past week I am trying 2 different external DS3231 devices on a m5stack FIRE. I have a GROVE Hub (with 3 I2C connectors) connected to the Port A of the Fire. The DS3231 I connected to the I2C Hub. I connected a MiniWare LA104 analyzer to a 2nd port otf the I2C Hub. a M5 RGB LED I connected to Port B of the Fire. The main script I programmed to let the middle RGB LED blink at the moment the script calls rtc.datetime(). Everything works except the readings from the DS3231 clock register (Addresses 0x0 - 0x6) remain mostly static. I don't see the seconds increase. I see the minutes increase but after 3 increases jump back to zero, e.g.: time is 18:40:00 After a minute the time shows 128:41:00, then 18:42:00 and then back to 18:40. This while at that moment the script runs inside a loop. So, the initial setting of the datetime registers only occur at the startup moment.

      I created a link to a Dropbox folder with the script main.py, the rtc classes in urtc.py and other files used during a run. Also a subfolder with various images that will give some impressions about the setup and signals visualized.
      Link: RTC_folder_in_Dropbox

      Question:
      Why are the datetime rtc registers not updating?

      Note:
      I modified the urtc.py file. Added various functions. Also added some try...except... blocks to prevent crashes in case functions receive a NoneType value or in case an I2C bus error occurs (this happened once in a while since I have the I2C analyzer connected to the bus. Mayby the handling of the analyzer did cause some noises on on or more lines.

      posted in General
      P
      Paulskpt
    • RE: Where do I find game Super Mario for M5 FACES ?

      @flypeek Thank you! Never thought I should look in the 'Lessons' section.

      posted in Cores
      P
      Paulskpt
    • Where do I find game Super Mario for M5 FACES ?

      The M5Stack advertisements for the M5 FACES core all show an image of the game Super Mario used on the FACES device. Also, I saw videos on YouTube about this game being played on the M5 FACES device. Unfortunately, I am unable to find a link to where one can download that retro game. Stange that M5Stack uses this game a lot for marketing purposes but does not furnish their clients with a link. The page Learn doesn't show the game as an learning example. I don't mind if I must buy the game.game on M5Stack site

      posted in Cores
      P
      Paulskpt
    • FACES /apps/game.py doesn't run properly (solved)

      Hi, I just got a FACES set delivered.
      When exploring the apps that came with the UIFlow firmware (V1.3.3) I discovered the following:
      The script /apps/game.py did not run properly. It showed only the small icon image above the btnB position and a bigger version of this icon in the upper half of the display. However the latter did not change (which it should).
      I discovered that the source of the problem was: filenames of the image files that had more than 8 characters.
      In the folder /flash/img I changed file names of these three image files to: rock.jpg, paper.jpg and scissors.jpg.

      rps_img = (
      'img/rock_128.jpg',
      'img/paper_128.jpg',
      'img/scissors_128.jpg'
      )

      lcd.clear(lcd.WHITE)

      lcd.image(48, 200, 'img/rock_128.jpg', 2)
      lcd.image(143, 200, 'img/paper_128.jpg', 2)
      lcd.image(238, 200, 'img/scissors_128.jpg', 2)

      This fact did not crash the script but it worked only partially.
      I made the following modifications:
      a)

      rps_img = (
      'img/rock.jpg',
      'img/paper.jpg',
      'img/scissors.jpg'
      )

      b) since there was already defined rps_img, I used this in the following commands:

      lcd.image(48, 200, rps_img[0], 2)
      lcd.image(143, 200, rps_img[1], 2)
      lcd.image(238, 200, rps_img[2], 2)

      Another problem occurred after I flashed the device with the latest UIFlow firmware (V1.9.4) using M5Burner.
      Now the script /apps/game.py crashed because the function machine.random() does not exist anymore.
      The command: rand = machine.random(2) I replaced by:
      from random import randint
      rand = randint(0,2)

      Now the script ran again OK.

      posted in FACES Kit
      P
      Paulskpt
    • RE: No Micropython On my new Faces?

      Maybe my response comes like 'mustard after the meal' but anyhow. I just got a FACES set delivered. Using the M5Burner I flashed the latest UIFlow firmware.
      Using the Thonny app (under MS Windows 11) I was able to use REPL.

      posted in FACES Kit
      P
      Paulskpt
    • RE: DS3231 on M5Stack - Need your Help

      @morguane I just saw your topic (of almost a year ago). I guess you solved your problems with the external RTC by now. But anyway liked to inform you about the repo I published on GitHub, using a D3231 RTC with a M5Stack Core1 (BASIC). DS3231 on M5Stack_DS3231_uRTC.
      Regards,

      posted in Arduino
      P
      Paulskpt
    • RE: UIFlow 2.0.0 firmware preview version

      This is my second feedback. This is about documentation. The subject of 'documentation' It is an old story. Programmers were always late with documenting their work. Often they waited with documenting until the last moment. Nowadays there are tools to assist us. I see that M5Stack has quite some documentation. But in my short life of experience in this M5Stack world, and viewing through the mind of a programmer, (until now) I could not find a central place where all the functions are documented. I see that the documentation is more device-orientated. This is good to help a starter; to give him/her adequate documentation for that device to experiment with. Yes, there is a good explanation of UIFlow. However, for the more experienced programmer, that does not want to spend time on building blockly structures, a central place to quickly lookup a documentation of libraries/functions, I missed. Something like 'read-the-docs' system. I googled for: m5stack read the docs. The first 'hit' was: M5Stak | Read the Docs'. It was a quite empty page. I clicked on a link to a that stated: 'Repository' : Link to repo M5Stack read-the-docs' . I arrived at m5-docs. On this page is written: This repository is out of maintenance. Bad luck! Then I went back to the former page; I clicked on a link named master. I was re-directed to a page: m5stack read-the-docs. To my surprise the page is empty! Did I look in the wrong places?
      When I was writing my first micropython script for a M5Stack device, I had a simple question when I wanted to set a text font for the lcd. I found that the m5stack.display.TFT module has an attribute (function) called font. Immediately came up in my mind the question: 'but what does 'font' do? By experimenting I discovered I could set a font like lcd.FONT_Default. Next the question: 'How can I know which font type already has been set with 'font'? Can I use 'font' to perform a 'get'? By experimenting I discovered that issuing a m5stack.display.TFT.font() command resulted in: TypeError: function missing 1 required positional arguments. My conclusion: font() cannot be used to find out which font is active. As you see, I learn to program a M5Stack device the 'hard' way. That is kinda frustrating. Documentation is what I need. Did I miss something while searching for the 'right' and 'useful' documentation? (Afterburner/addition: some hours after writing this post I happened to come across m5-docs/docs/en/api/lcd.md. There are a lot of descriptions of functions that are in that api/lcd library. I saw that, among many other functions, the library contains these functions: fontsLoaded() and unloadFont. But these functions are not in the UIFlow micropython firmware V1.9.4).
      What about an answer to: how to use an icon like m5stack.display.TFT.ICON_USB ? Where is that documented?
      Excuse me if I stepped on someones feet with this kind of critical feedback; being a newbie, ignorant to M5Stack. Yes, I want to learn more about M5Stack. Please show me the way. The needed information appears to be much dispersed. It would be very helpful that the information was more centralized. It appears to me a bit odd to find m5-docs in a place as Github. It should have been in a place like read-the-docs (or in both places).
      Regards,
      Paulus Schulinck (@Paulskpt)

      posted in Official Updates
      P
      Paulskpt
    • RE: UIFlow 2.0.0 firmware preview version

      Hi,
      I just recently stepped into the 'world of M5Stack'. I am learning fast :-). Yesterday I published a small repo for M5Stack on GitHub and posted this fact in this Community forum. Thank you for your efforts to improve the firmware for M5Stack devices. The past ten years I experimented with Arduino, Raspberry Pi's (all models) , ESP32-S2. I prefer to write in Python but also built projects in C, C++. While trying to get aquainted to the M5Stack firmware I used REPL in Thonny to see which modules/functions are present in the several libraries. I discovered that there exist (at least appear in the dir() listings issued in REPL of Thonny). doubling of functions in the various library modules, for example: in 'vfs' exist: mount, umount, mkdir, chdir etcetera. These same functions also exist in the 'uos' module: mount, umount, mkdir, chdir and more. The module 'os' has the same contents as 'uos'. To me this is: a) confusing; b) if it are not a kind of 'links' (or say: 'redirection' -- my expression to this phenomenon) of a function in library 'x' to a function in libary 'y', then it will be a waste of memory too; c) this fact does not help to improve the quality and reliability of programs. I think that a function should be unique: be in one place only. This will also make writing and reading code more easy; helps preventing bugs and so on. But this is just a thinking on my side. I am not familiar with the internals of the current set of modules that make up the micropython firmware for the M5Stack family of devices. I started programming around 1978 with a 'computer' having only 64kB of RAM. Learning all kind of tricks, e.g.: re-use of RAM at runtime. If your intention is to 'optimize' the firmware you could start with a 'cleanup session' by taking out these confusing doublings. Question : is there a reason to have the same function in more than one library/module? This is just my first impression which I wanted to share with you since you asked: '...that you help us develop and test firmware...'
      Regards,
      Paulus Schulinck (@Paulskpt)

      posted in Official Updates
      P
      Paulskpt
    • RE: IoT with M5Stack and UIFlow is now live!

      Hi Adam,
      congratulations with the publishing of your new book. I am interested to buy it but I am a man alone living in a small apartment. Years ago I owned many books. Now I prefer to buy books in electronic form. I visited Amazon. Searched and found the book. I discovered that the book is not yet available for Kindle. I clicked on a link to inform the publishing company to ask them to make the book available for Kindle.
      Looking forward this will happen.
      Regards,
      Paulus Schulinck

      posted in General
      P
      Paulskpt
    • M5Stack D3231 uRTC module

      Hi,
      I would like to inform that I just published a small repo on Github, title: M5Stack_DS3231_uRTC. It is a module for use in MicroPython. It uses a modified version of Adafruit-uRTC library (which Adafruit marked 'Deprecated'). Beside various modifications in the file urtc.py, like the use of dictionaries, I added several functions as: weekday(), isLeapYear(), daysInMonth(), yearday() and cur_month(). The module provides the use of an external DS3231 RTC device with a M5Stack Core1 (BASIC) as host, connected via I2C.
      See: M5Stack_DS3231_uRTC,
      The main.py file is a combination of some tests: a) getting /setting date and time from the external RTC; b) read and display images from flash and from SD-Card; c) use of an MYVARS class to save variables and use them globally. The module is tested on a Core1 (BASIC).

      posted in General
      P
      Paulskpt
    • RE: Basic Core V2.4 vs V2.6

      @arzaman I have the same model and version "V2.4 1420". Do you already have an answer to your question? I would like to know also.

      posted in Cores
      P
      Paulskpt
    • RE: Does there exist a doc/explanation of all commands/blocks used in UI Flow

      @ajb2k3 ahh, thank you!

      posted in UIFlow
      P
      Paulskpt
    • RE: Does there exist a doc/explanation of all commands/blocks used in UI Flow

      @paulskpt Can you please explain what you mean with 'consider creating a 'log' on hackster.io ? I visited the website but I do not find a 'system' to create a 'log'. Perhaps you meant to write 'blog' ? I found various projects about 'logging ' but this is sure not what you meant.

      posted in UIFlow
      P
      Paulskpt
    • RE: Does there exist a doc/explanation of all commands/blocks used in UI Flow

      @ajb2k3 Thank you for your reply. Thank you also for your hint about creating a log on hackster.io. By now I created a v2 of my document. I changed the titel into "My first steps with the M5Stack UIFlow IDE". In the document I refer to it as "my notes". The Intro I changed. I digged a bit into what is 'Blockly'. At the end I wrote a paragraph "About me". I uploaded v2 and I deleted the initial version. OK about pm or email. I'll contact you soon.

      posted in UIFlow
      P
      Paulskpt
    • RE: Does there exist a doc/explanation of all commands/blocks used in UI Flow

      @ajb2k3 Hi, Adam, thank you very much for your rapid reply. I will modify the document conform your advices.
      The reason your 'name' : '@ajb2k3' is shown on every page was that I had put it in the header of the MS Word document. Until now I did not know your real name: Adam Bryant. My name is: Paulus Schulinck.
      I will create a repo on my GitHub page (@PaulskPt).
      For manipulating images I use that longtime MS Windows utility 'Paint'. A Simple program. Gimp I know. I use it when I run a full Linux session (from a separate disk in my desktop PC).
      Never thought about publishing. I think I am not that good as a writer. Besides, English is not my native tongue.
      Visited the amazon page with your book. Looks nice!
      I am very greatful for all those people in the world that share their work as open software etc. I learned a lot from their publications. That is why, I want to do something in return.
      Would like to introduce myself more to you but I don't want to share some details here.
      Greetings,
      Paulus

      posted in UIFlow
      P
      Paulskpt
    • RE: Does there exist a doc/explanation of all commands/blocks used in UI Flow

      @ajb2k3 The past days I studied and experimented a lot, mainly with a M5Stack Core2 and a M5Stack CardKB. I learned a lot, partly with help from your Handbook. Thank you for publishing it. I have the custom to make notes of my experiments. This is my way of learning. It also helps me, in later moments, to remember myself what I did in that moment of experimenting. I used your handbook as a start. I decided to rework it and add to it things that I discovered. The document is now 37 pages. I saved as a .pdf file. In the final paragraphs I added a description how I managed to download (backup) all files that were on the device. At first I was, for instance, not able to download .IMG, .JPG, .PNG and some other filetypes. Then I used a method that uses the Thonny app to write files to a Raspberry Pi Pico, to download files from the M5Stack device to the host PC using Thonny. I want to share the file with you. I would appreciate to hear from you what you think about it. Unfortunately, this forum interface does not allow to upload .docx or .pdf files. only images, so I copied the .pdf to a Dropbox folder. Here is the link to that folder:
      [link https://www.dropbox.com/sh/5cy7v623ksp8mp1/AAADNdYm3x8P5-iSQzkyDFx0a?dl=0].
      I'll keep this Dropbox folder available for some time.

      posted in UIFlow
      P
      Paulskpt