Navigation

    M5Stack Community

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

    aafortinet

    @aafortinet

    1
    Reputation
    25
    Posts
    878
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    aafortinet Follow

    Posts made by aafortinet

    • RE: ENV III unit on M5Stack CoreInk

      Ok - I found. You have to use #include "M5_ENV.h" and include the library M5UNIT-ENV in Arduino.

      posted in Units
      A
      aafortinet
    • ENV III unit on M5Stack CoreInk

      Hi,
      Very n00b question, but how do I use the ENV III sensor on CoreInk? T
      From sample code https://docs.m5stack.com/en/unit/envIII, I tried this but UNIT_ENV.h does not exist on CoreInk

      #include "M5CoreInk.h"
      #include "UNIT_ENV.h"
      
      SHT3X sht30;
      QMP6988 qmp6988;
      

      Same #include "M5_ENV.h" does not exist either.
      Thanks.

      posted in Units
      A
      aafortinet
    • Erasing the EEPROM of a m5CoreInk

      Hello,
      I have written data in the EEPROM of a M5 CoreInk, using EEPROM.write().
      How can I erase the entire area? Of course, I can write the area with zeros, but this is going to be long. Is there something like EEPROM.clear() or anything?
      Thanks

      posted in Arduino
      A
      aafortinet
    • RE: Bad Ultrasonic distance measure

      @aafortinet after more measures, the ultrasonic sensors seems to work correctly. It's just that (1) the units in my program were wrong, (2) it does not work below 2cm and above 150 and gives erroneous answer then. This range isn't very big, and typically I measured 2m.

      posted in Units
      A
      aafortinet
    • Bad Ultrasonic distance measure

      My ultrasonic sensor reports a bad distance. For example, I measure to the ceiling of the room, and it reports 80 cm where it is above 2 meters.

      I have:

      • a Ultrasonic range sensor
      • a M5 CoreInk. The sensor is connected on GPIO 32 and 33.

      This is how I do it. Can you tell me what's wrong or an idea how to debug? thx

      #define M5_I2C_ADDR_ULTRASONIC 0x57
      Ink_Sprite InkPageSprite(&M5.M5Ink);
      
      void setup() {
        M5.begin(); //Init CoreInk.  
        digitalWrite(LED_EXT_PIN,LOW);
        
        if( !M5.M5Ink.isInit()) //Init CoreInk screen.
        {
          Serial.printf("[-] M5Ink init failed");  
          while (1) delay(100);
        }
      
        Wire.begin(32,33);
        Serial.printf("[+] Wire begin done\n");
      
        M5.M5Ink.clear();   //Clear screen. 
        Serial.printf("[+] Clearing eInk screen\n"); 
        delay(1000);
      
        if( InkPageSprite.creatSprite(0,0,200,200,true) != 0 ){
          Serial.printf("[-] Ink Sprite create failed");
        }
       
      }
      
      void loop() {
        static float distance = 0;
        distance = readDistance();
        Serial.printf("Distance=%.1f cm\n",distance);
        if ((distance < 150) && (distance > 0)) {
            char buffer[30];
            sprintf(buffer,"%.1f cm",distance);
            InkPageSprite.drawString(15,150,buffer,&AsciiFont24x48);
            InkPageSprite.pushSprite();
        }
      
        // Sleep 
        delay(2000);
      }
      posted in Units
      A
      aafortinet
    • RE: M5core Ink battery duration

      My battery duration seems longer: the program I ran Tuesday is still running "more or less". By "more or less" I mean that sometimes I find the M5 with a black screen, and I have to press the POWER ON button to wake it up. I shouldn't need to do that, so this strange. But at least with the counter displayed on the screen, I know my program ran for 72 hours (indeed more or less 3 days).

      Difference with yours:

      • I do not connect to a Wifi / Internet (which usually consumes battery quite a lot)
      posted in General
      A
      aafortinet
    • RE: M5core Ink battery duration

      @eddie2070 ok - got the answer for shutdown(): it only works when powered from battery. So, I've created a small test program that just displays an image + counter, then shuts down for 1 hour. I'm going to see how long it lasts...

      posted in General
      A
      aafortinet
    • RE: M5.shutdown(x) does not last x seconds

      @felmue said in M5.shutdown(x) does not last x seconds:

      the shutdown functionality only works when M5CoreInk is running from battery.

      ah haaaaaaaa! ok! Thanks for the remark! Indeed. And now it works (when from battery).

      And if somebody wonders, it might be useful to note in the doc that shutdown() actually has the M5 run again the setup() code (it makes sense, as it is "shut-down" but worth mentioning because it changes the way to implement things).

      posted in Arduino
      A
      aafortinet
    • 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...

      posted in Micropython
      A
      aafortinet
    • RE: Newbie at ALL. Be patient.

      Found my error. I had flashed the M5 with a program of my own using Arduino. Using the UI Flow firmware, I get the Micropython REPL no problem with screen /dev/ttyUSB0 115200.

      posted in Micropython
      A
      aafortinet