Navigation

    M5Stack Community

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

    felmue

    @felmue

    68
    Reputation
    353
    Posts
    893
    Profile views
    3
    Followers
    2
    Following
    Joined Last Online
    Location Switzerland

    felmue Follow

    Posts made by felmue

    • RE: Core2 how to know the current battery level

      Hello @Carles-B

      your numbers look about right.

      In your example with USB the battery is almost full but is still being charged with 14mA as indicated by GetBatChargeCurrent(). And those 14mA are going into the battery (positive) as indicated by GetBatCurrent(). If you keep USB attached and wait for the battery to be fully charged isCharging() will go to 0 (false).

      W/o USB the battery now is being discharge with 88.5mA (the minus sign indicates energy going out of the battery). And obviously w/o USB the battery no longer is being charged, hence GetBatChargeCurrent() is 0 and isCharging() is 0 (or false).

      Which value(s) are not what you'd expect?

      Thanks
      Felix

      posted in Core 2
      felmue
    • RE: Drive 4 DC motors without encoder - NO LEGO

      Hello @ajb2k3

      thank you for checking regarding firmware. There is a connector (J1 - STM32_SWD) which I guess could be used to (re-)program the STM32 MCU. So I guess they locked the firmware in - that's a pity. At least they should have thought about allowing for the I2C address to be changed then. There are plenty of unused IOs on the STM32 MCU which could have been used for that. Oh well, maybe in the next revision.

      Thanks
      Felix

      posted in Modules
      felmue
    • RE: How to flash tasmona or anything to M5Stack ATOM Lite using esptool?

      Hello @romeokienzler

      M5Atom lite essentially is just another ESP32 based device so I'd guess the regular Tasmota instructions should work (not tested myself though). Have you tried the instructions here?

      Good luck!
      Felix

      posted in Units
      felmue
    • RE: How to power M5Core2 from module?

      Hello @Elektron

      good find, thank you for sharing.

      It is interesting that in your case the 10k pull-down resistor already in place on N_VBUSEN wasn't strong enough (with GPIO0 set to float) and you had to configure GPIO0 to pull that line low actively. Makes me wonder if something has changed electrically inside (newer) M5Core2?

      Happy Stacking!
      Felix

      posted in UIFlow
      felmue
    • RE: M5Paper I2C

      Hello @Powersoft

      I am sorry to hear that. I found that sometimes it is helpful to take a break, work on something different for a while and then come back with fresh ideas.

      Best of luck!
      Felix

      posted in Modules
      felmue
    • RE: M5Paper I2C

      Hello @Powersoft

      yes and no. They both use a different set of GPIOs for internal and external I2C (unlike M5Stack Fire, Gray, etc., which use the same).

      However M5Paper uses Wire for the internal I2C and Wire1 for external I2C. M5Core2 does it the other way round and uses Wire1 for internal I2C and Wire for external I2C.

      When M5Core2 came out I thought the assignment makes a lot of sense since a lot of external libraries have Wire hard coded (as I mentioned already) so on M5Core2 those libraries can be used without modification.

      Why on M5Paper the M5Stack engineers decided to use it the other way round is anyones guess. If I had to guess it was a different engineer preparing M5Paper than M5Core2, but that is my personal opinion alone.

      The other thing is that M5Core2 always initialises Wire1 and Wire can be initialised via a parameter in M5.begin() whereas on M5Paper only Wire is initialised always by default.

      Other than that I don't think there are any other differences regarding I2C of this two devices.

      Thanks
      Felix

      posted in Modules
      felmue
    • RE: M5Paper I2C

      Hello @Powersoft

      thank you for reporting back. I am glad it works - well, at least for this device.

      And yes, not all libraries allow for the Wire/Wire1 parameter to be supplied via begin() function call. There are a lot of libraries which have Wire hard coded. In such a case you can modify your local copy of the library to your needs.

      Thanks
      Felix

      posted in Modules
      felmue
    • RE: M5Stack / GPS / UIFlow

      Hello @Uli

      When you say 'GPS sensor' what is the exact hardware you have? Do you have a GPS Module or a GPS Unit from M5Stack or a device from another vendor?

      What do you mean exactly by 'limitations and possible workarounds'? Where did you read about it?

      I do not own a GPS Module or GPS Unit so I cannot test it myself, but when I select M5Stack Fire as device in UIFlow 1.7.2 I do see support for both.

      Thanks
      Felix

      posted in SOFTWARE
      felmue
    • RE: M5Paper: How to display large jpg image from web (or download it to SD card)

      Hello @doubleness

      M5Paper has 8MB of PSRAM on board of which 4MB can be used at the time. (The limitation is ESP32 which only can map 4MB at the time).
      And canvas.drawJpgUrl() already makes use of PSRAM by calling ps_malloc():

          uint8_t *p = (uint8_t*)ps_malloc(size);
          if(p == NULL)
          {
              log_e("Memory overflow.");
              return 0;
          }
      

      In my test I was able to directly download and display jpgs up to about 4MB. (No SD card involved.)

      Thanks
      Felix

      posted in SOFTWARE
      felmue
    • RE: M5Paper I2C

      Hello @Powersoft

      the two I2C use Wire (internal) and Wire1 (external). By default the Adafruit library uses Wire, but for M5Paper we want it to use Wire1. Luckily the sgp.begin() function allows to overwrite the default.

      Try something like this (untested):

        M5.begin(); // initialises internal I2C (uses Wire)
        Wire1.begin(25, 32); // initialises external I2C (uses Wire1)
        Serial.println("\n\n=====SGP30 test====");
      
        if (! sgp.begin(&Wire1)){
      

      Hope this works.

      Cheers
      Felix

      posted in Modules
      felmue