🤖Have you ever tried Chat.M5Stack.com before asking??😎
  • M5Atom S3 Exception LoadProhibited if dead code is present

    Arduino
    5
    0 Votes
    5 Posts
    2k Views
    N
    Hey @felmue, thanks, this did solve all the issues! Didn't know that I can solely rely on the Unified library without any further changes. Do you know if this is intended, and if so, why does the Board-specific library exist? Thank you so much for your help!
  • Arduino M5Core2 Buttons

    Arduino
    2
    0 Votes
    2 Posts
    2k Views
    S
    @SirMichael I found what I was looking for, a simple sketch to create a button. I did some minor massages, taking from the events_buttons_gestures_rotation.ino and figured it out. #include <M5Core2.h> ButtonColors on_clrs = { RED, WHITE, WHITE }; ButtonColors off_clrs = { BLACK, WHITE, WHITE }; Button myButton(10, 10, 80, 60, false, "Button", off_clrs, on_clrs, TL_DATUM ); void setup() { M5.begin(); M5.Buttons.draw(); } void loop() { M5.update(); if (myButton.wasReleased()) Serial.print("* "); } Sir Michael
  • Need someone to teach arduino have a stickcplus2

    Arduino
    2
    0 Votes
    2 Posts
    2k Views
    F
    https://docs.m5stack.com/en/arduino/arduino_ide https://docs.m5stack.com/en/arduino/m5stickc_plus2/program * @Hardwares: M5StickCPlus2 * @Platform Version: Arduino M5Stack Board Manager v2.0.9 * @Dependent Library: * M5GFX: https://github.com/m5stack/M5GFX * M5Unified: https://github.com/m5stack/M5Unified * M5StickCPlus2: https://github.com/m5stack/M5StickCPlus2 */ #include "M5StickCPlus2.h" *focus
  • TZ magic in ESP/M5Unified

    Arduino
    1
    1 Votes
    1 Posts
    1k Views
    No one has replied
  • M5Dial Arduino USB HID/Mouse example

    Arduino
    3
    0 Votes
    3 Posts
    2k Views
    E
    Hi @scobb, did you solve the problem? I'm currently working on a "macro board" with the M5Dial. I can't seem to find a way that the dial communicates with my computer, but I already saw an OBS controller on YouTube which really bothers me because their is a way but I can't find it. Also the OBS controller is not public so I cannot use the code from it.
  • Restore BALA2 fire firmware for selfbalancing robot

    Arduino
    8
    0 Votes
    8 Posts
    7k Views
    A
    @wzemann I have the same problem, restore the original firmware, are You solved? Thanks Alberto
  • 0 Votes
    4 Posts
    3k Views
    ajb2k3A
    @avmg2502 How is it crashing? What is the error message?
  • CoreS3 & NCIR 2 UNIT not reading sensor correctly

    Arduino
    3
    0 Votes
    3 Posts
    2k Views
    R
    @kuriko i wanted the code to read in Fahrenheit . But also the issue is that it’s the reading the i2c connection but in UIFlow it does.
  • 0 Votes
    9 Posts
    6k Views
    felmueF
    Hello @ScheduleDisplay I am glad to hear it works for you now. Yes, the battery will drain much faster when using ESP32 deep sleep or light sleep compared to a full shutdown. You can find the currents for all three modes here. Thanks Felix
  • M5Dial Timezones data to Google

    Arduino
    3
    0 Votes
    3 Posts
    2k Views
    kurikoK
    @Paulskpt which library are you using for ui? m5gfx or lvgl?
  • M5StickPlus2 with ENVIV unit

    Arduino
    2
    0 Votes
    2 Posts
    1k Views
    robskiR
    @guarthur see below sample from example and sample from uiflow [image: 1732522355498-snip_m5c3.jpg] [image: 1732522368550-snip_m5c2.jpg] check that correct gpio is declared
  • M5Dial display goes black randomly.

    Arduino
    2
    0 Votes
    2 Posts
    1k Views
    PaulskptP
    I see that 50 people saw my post. Nobody out there that had similar experience or knows / saw about a solution?
  • Need to make an alarm sound when temp rises on the M5core2

    Arduino
    3
    0 Votes
    3 Posts
    2k Views
    I
    @robski I am not sure about your question - are you asking about the main code or the sound making code? I have tried a lot of different approaches to get an alarm sound but nothing worked. Last try was with https://github.com/Hagtronics/M5Stack-Core2/tree/main/Sound but with no success. I just need any working piece of code that makes a beep sound and I will add it to my main code.
  • connecting for a first time m5core2 with adruino IDE

    Arduino
    2
    0 Votes
    2 Posts
    1k Views
    kurikoK
    @ioamas No you do not need a SD card. Just install drivers, plug in and press upload button. https://docs.m5stack.com/en/core/core2
  • 0 Votes
    5 Posts
    3k Views
    kurikoK
    @Krmiller Maybe you should look at the source code of the library to see what it does directly when connecting to the first/second client...I think it's still related to the blockage
  • using M5.Speaker.playWav in void loop()

    Arduino
    2
    0 Votes
    2 Posts
    1k Views
    kurikoK
    @alecdvor Maybe this function blocks the code that follows it?
  • 0 Votes
    2 Posts
    1k Views
    robskiR
    @gdbongle said in Writing serial output from sensor to USB stick connected by M5Stick's onboard USB-C port: I'm trying to get data from a sensor connected to my M5Stick and put it in CSV format to be written to a USB stick for later processing (including timestamps) but I'm not sure where to begin, nor have I found anything of relevance on the forums/docs. Is there somewhere I can begin? writing in to SD card would be one to start from I think
  • What is JPEG_DIV_NONE?

    Arduino
    3
    0 Votes
    3 Posts
    4k Views
    P
    @ajb2k3 Had the same question and here the answer: jpeg_div_t scale = JPEG_DIV_2; // JPEG_DIV_NONE, --> no scale // JPEG_DIV_2, --> half the size // JPEG_DIV_4, // JPEG_DIV_8, // JPEG_DIV_MAX M5.Lcd.drawJpgFile(SD, filename.c_str(), 0, 0, 320, 240, 0,0, scale);
  • M5StickCPlus2: want to know how to wake up from deep sleep

    Arduino
    3
    0 Votes
    3 Posts
    2k Views
    S
    @felmue Thanks! It seems to work well.
  • "ESPAsyncWebServer" equivalent working with LAN Module 13.2 ?

    Arduino
    4
    0 Votes
    4 Posts
    2k Views
    M
    Thanks @kuriko for your reply! With this informations I tried with this pins without success : #define INT_GPIO 35 #define MOSI_GPIO 23 #define MISO_GPIO 38 #define SCK_GPIO 18 #define CS_GPIO 33 I think there must be weird things happening in the SPI initialization with M5.begin() and all that, in any case this code doesn't work: #include <Arduino.h> #include <M5Unified.h> #include <M5Module_LAN.h> #include <SPI.h> #define _ASYNC_WEBSERVER_LOGLEVEL_ 2 M5Module_LAN LAN; ////////////////////////////////////////////////////////// // Optional values to override default settings // Don't change unless you know what you're doing #define ETH_SPI_HOST SPI3_HOST #define SPI_CLOCK_MHZ 25 // Must connect INT to GPIOxx or not working #define INT_GPIO 35 #define MOSI_GPIO 23 #define MISO_GPIO 38 #define SCK_GPIO 18 #define CS_GPIO 33 ////////////////////////////////////////////////////////// #include <AsyncTCP.h> #include <AsyncWebServer_ESP32_W5500.h> AsyncWebServer server(80); const char *PARAM_MESSAGE = "message"; void notFound(AsyncWebServerRequest *request) { request->send(404, "text/plain", "Not found"); } void setup() { M5.begin(); Serial.begin(115200); if (esp_netif_init() != ESP_OK) { Serial.println("main::setup(): Error: Unable to initialize network interface"); } uint8_t cs_pin = 33; uint8_t rst_pin = 0; uint8_t int_pin = 35; SPI.begin(SCK, MISO, MOSI, -1); LAN.setResetPin(rst_pin); LAN.reset(); LAN.init(cs_pin); Serial.print(F("\nStart AsyncSimpleServer_ESP32_W5500 on ")); Serial.print(ARDUINO_BOARD); Serial.print(F(" with ")); Serial.println(SHIELD_TYPE); Serial.println(ASYNC_WEBSERVER_ESP32_W5500_VERSION); Serial.println("Default SPI pinout:"); Serial.println("SPI_HOST:" + String(ETH_SPI_HOST)); Serial.println("MOSI:" + String(MOSI_GPIO)); Serial.println("MISO:" + String(MISO_GPIO)); Serial.println("SCK:" + String(SCK_GPIO)); Serial.println("CS:" + String(CS_GPIO)); Serial.println("INT:" + String(INT_GPIO)); Serial.println("SPI Clock (MHz):" + String(SPI_CLOCK_MHZ)); Serial.println("========================="); /////////////////////////////////// // To be called before ETH.begin() ESP32_W5500_onEvent(); // bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ, // int SPI_HOST, uint8_t *W5500_Mac = W5500_Default_Mac); // ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST ); Serial.print("Network::connectEthernet(): Connecting to Ethernet with DHCP "); byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED}; if (!Ethernet.begin(mac)) { Serial.println("Network::connectEthernet(): DHCP failed, aborting"); } EthernetLinkStatus linkStatus; while ((linkStatus = Ethernet.linkStatus()) != LinkON) { Serial.print("."); delay(100); } Serial.println(" ...Connection established!"); Serial.println("Network::connectEthernet(): IP address : " + LAN.localIP().toString()); Serial.println("Network::connectEthernet(): Subnet mask : " + LAN.subnetMask().toString()); Serial.println("Network::connectEthernet(): Gateway IP : " + LAN.gatewayIP().toString()); Serial.println("Network::connectEthernet(): DNS : " + LAN.dnsServerIP().toString()); ESP32_W5500_waitForConnect(); /////////////////////////////////// server.on("/", HTTP_GET, [](AsyncWebServerRequest *request) { request->send(200, "text/plain", "Hello, world from AsyncSimpleServer_ESP32_W5500"); }); // Send a GET request to <IP>/get?message=<message> server.on("/get", HTTP_GET, [](AsyncWebServerRequest *request) { String message; if (request->hasParam(PARAM_MESSAGE)) { message = request->getParam(PARAM_MESSAGE)->value(); } else { message = "No message sent"; } request->send(200, "text/plain", "Hello, GET: " + message); }); // Send a POST request to <IP>/post with a form field message set to <message> server.on("/post", HTTP_POST, [](AsyncWebServerRequest *request) { String message; if (request->hasParam(PARAM_MESSAGE, true)) { message = request->getParam(PARAM_MESSAGE, true)->value(); } else { message = "No message sent"; } request->send(200, "text/plain", "Hello, POST: " + message); }); server.onNotFound(notFound); server.begin(); } void loop() { delay(1000); }