Navigation

    M5Stack Community

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

    Posts made by PierreD

    • RE: Reboot ESP32 Basic Core IoT on battery/USB

      Hello Wold101,

      Thanks for your answer.

      I need to continue to use the M5Stack Core as I have made some backplane electronics and need to use the M5Stack stock.

      I didn't know about this post and I already used a diode and had a bug with the ESP. Probably this problem of low battery charge.

      The idea is great to use a MAX40200 but it requires extra wiring.

      I tried with a capacitor. I have some 4700µf in stock at 63V.

      I like this solution, no modification and it works well.

      I will test it over several days.

      posted in Cores
      P
      PierreD
    • RE: Reboot ESP32 Basic Core IoT on battery/USB

      A simple demo code here :

      #include <M5Stack.h>

      // the setup routine runs once when M5Stack starts up
      void setup() {

      // initialize the M5Stack object
      M5.begin();

      M5.Power.begin();

      // Lcd display
      M5.Lcd.fillScreen(WHITE);
      delay(500);
      M5.Lcd.fillScreen(RED);
      delay(500);
      M5.Lcd.fillScreen(GREEN);
      delay(500);
      M5.Lcd.fillScreen(BLUE);
      delay(500);
      M5.Lcd.fillScreen(BLACK);
      delay(500);

      // text print
      M5.Lcd.fillScreen(BLACK);
      M5.Lcd.setCursor(10, 10);
      M5.Lcd.setTextColor(WHITE);
      M5.Lcd.setTextSize(1);
      M5.Lcd.printf("Display Test!");

      // draw graphic
      delay(1000);
      M5.Lcd.drawRect(100, 100, 50, 50, BLUE);
      delay(1000);
      M5.Lcd.fillRect(100, 100, 50, 50, BLUE);
      delay(1000);
      M5.Lcd.drawCircle(100, 100, 50, RED);
      delay(1000);
      M5.Lcd.fillCircle(100, 100, 50, RED);
      delay(1000);
      M5.Lcd.drawTriangle(30, 30, 180, 100, 80, 150, YELLOW);
      delay(1000);
      M5.Lcd.fillTriangle(30, 30, 180, 100, 80, 150, YELLOW);

      }

      // the loop routine runs over and over again forever
      void loop(){

      //rand draw
      M5.Lcd.fillTriangle(random(M5.Lcd.width()-1), random(M5.Lcd.height()-1), random(M5.Lcd.width()-1), random(M5.Lcd.height()-1), random(M5.Lcd.width()-1), random(M5.Lcd.height()-1), random(0xfffe));

      M5.update();
      }

      posted in Cores
      P
      PierreD
    • RE: Reboot ESP32 Basic Core IoT on battery/USB

      a video showing the battery reboot problem :

      https://photos.app.goo.gl/SK2xeaiBvxcBfyHE8

      posted in Cores
      P
      PierreD
    • Reboot ESP32 Basic Core IoT on battery/USB

      Hello,

      I use M5Stack ESP32 Basic Core IoT, arduino programming with battery SKU: M002.

      I am doing telemetry.

      I permanently power the ESP32 via USB.

      The battery is there for safety in case of power failure.

      My problem is :

      When I turn off the power, the ESP32 reboots.
      I lose my telemetry data.

      I saw this page on Power
      https://github.com/m5stack/m5-docs/blob/master/docs/en/api/power.md

      I have tried a lot of options but it doesn't work!
      Do you have a solution ?

      Best regards

      Pierre

      posted in Cores
      P
      PierreD
    • Alimenter M5Stack par le connecteur Grove I2C

      Hello,

      I want to mount the M5stack on a backplane.
      I want to use an I2C GPIO Expander which will be connected to the M5Stack grove connector.
      Can I power the M5Stack with the grove connector?

      Will the battery be maintained on charge?

      Best regards.

      Pierre

      posted in M5stack Grey
      P
      PierreD
    • RE: Display on during deep sleep?

      Hello Crami25,

      Thank you for your help.
      I took the time to try, to test.

      For sleep, it's OK.
      I made a small example but it doesn't work every time ???

      On the other hand, I wish to wake up with the buttons.
      I've searched the schematics:
      Button A GPIO39
      Button B GPIO38
      Button C GPIO37

      Following the example of this site:
      https://randomnerdtutorials.com/esp32-external-wake-up-deep-sleep/

      ext0
      In this example, the ESP32 wakes up when the GPIO 33 is triggered to high:

      esp_sleep_enable_ext0_wakeup(GPIO_NUM_33,1); //1 = High, 0 = Low
      Instead of GPIO 33, you can use any other RTC GPIO pin.

      #include <M5Stack.h>

      #define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds /
      #define TIME_TO_SLEEP 10 /
      Time ESP32 will go to sleep (in seconds) */
      //#define BUTTON_PIN_BITMASK 0x8000000000

      void setup()
      {
      Serial.begin(115200);
      M5.begin(true, false, true);
      esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR);
      Serial.println("Setup ESP32 to sleep for every " + String(TIME_TO_SLEEP) + " Seconds");

      esp_sleep_enable_ext0_wakeup(GPIO_NUM_39,0); //1 = High, 0 = Low

      //esp_deep_sleep_start(); //entre en someil profond

      }

      void loop() {

      M5.update();// update button state

      if (M5.BtnA.wasReleased())
      {
      esp_sleep_enable_ext0_wakeup(GPIO_NUM_39,0); //1 = High, 0 = Low
      }

      if (M5.BtnB.wasReleased())
      {
      esp_deep_sleep_start(); //entre en someil profond
      }

      if (M5.BtnC.wasReleased())
      {
      M5.Lcd.fillScreen(WHITE);
      M5.Lcd.setTextColor(BLUE);
      M5.Lcd.setBrightness(100);
      M5.Lcd.setTextSize(2);
      M5.Lcd.setCursor(40, 60);
      M5.Lcd.print("Temperature: ");
      }
      }

      posted in Cores
      P
      PierreD
    • RE: Display on during deep sleep?

      @m5er said in Display on during deep sleep?:

      dernières valeurs et se réveille toutes les X minutes pour mettre à jour les mesures; affichage du nombre d'abonnés twitter, de likes, de visites de pages, etc. Dans tous ces cas d'utilisation, il est utile de laisser le CPU dormir la plupart du temps pendant que l'affichage reste allumé.
      Dans tous les cas, ce serait bien si quelqu'un pouvait présenter une solution de travail. Ce n'est probablement que quelques lignes de code, mais je n'arrive pas à trouver les bonnes.

      Hello,

      I'm editing this old post... Do you have a solution?

      Pierre

      posted in Cores
      P
      PierreD
    • Visual Studio Core

      Hello,

      Can we use "Visual Studio Core" instead of the Arduino IDE?

      Thank you in advance,

      Pierre

      posted in Arduino
      P
      PierreD