🤖Have you ever tried Chat.M5Stack.com before asking??😎

Subcategories

  • 549 Topics
    2k Posts
    T
    Hi, this would do the work https://github.com/ThatsLucas/M5Unit-ACMeasure-Internal-FW You need to reflash it though
  • When you meet problems using M5Stack, we help you solve it.

    200 Topics
    989 Posts
    robskiR
    @johnericsutton hard to believe that unit is designed in such way to report value only when measured source is above 0...
  • 504 Topics
    2k Posts
    C
    In case anyone else comes across this post, it appears that the wires coming out of the DinMeter PortB are reversed to the label, at least on my unit. G1 is the yellow wire, and G2 is the white one. It works as expected to do a digital read on the pins for a button push.
  • 1k Topics
    6k Posts
    ShawnHymelS
    @felmue That helps a lot, thank you!
  • 55 Topics
    203 Posts
    J
    I have been able to get a program to work that uses the M5EchoBase library but no luck using the unified library. For example the simple program below doesn't work. #include <M5Unified.h> void setup() { // 1. Initialize M5Unified delay(1000); // Delay for a moment to allow the system to stabilize. auto cfg = M5.config(); cfg.serial_baudrate = 115200; M5.begin(cfg); // 2. Configure the Speaker for the Atomic Audio Base (ES8311) // We access the speaker configuration directly via M5.Speaker.config() auto spk_cfg = M5.Speaker.config(); // Set pins for Atomic Audio Base (ES8311) spk_cfg.pin_bck = 8; // BCLK spk_cfg.pin_ws = 6; // LRCK (WS) spk_cfg.pin_data_out = 5; // DAC (DOUT) spk_cfg.i2s_port = I2S_NUM_0; // Configure for external codec (not internal DAC) spk_cfg.use_dac = false; spk_cfg.sample_rate = 44100; // Apply the configuration M5.Speaker.config(spk_cfg); // 3. Start the speaker M5.Speaker.begin(); // 4. Set volume (0-255) M5.Speaker.setVolume(128); } void loop() { M5.update(); // Play a 1000 Hz tone for 1000 milliseconds (1 second) M5.Speaker.tone(1000, 1000); // Wait for the tone to finish delay(1000); // Small delay before next loop delay(1000); } Is there no way to set up the ES8311 codec without using M5EchoBase? strangely if I run the program below then load the above program the tone works? But I can't stick the M5.Speaker.tone(1000, 1000); command in the program below and have it work. Does anyone know how to play a tone using only the Unified library from an AtomS3R into a Atomic Audio Base (ES8311 codec)? #include <M5Unified.h> #include <M5EchoBase.h> #if defined(CONFIG_IDF_TARGET_ESP32S3) #define RECORD_SIZE (1024 * 400) #elif defined(CONFIG_IDF_TARGET_ESP32) #define RECORD_SIZE (1024 * 400) #endif #if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)) M5EchoBase echobase; #else M5EchoBase echobase(I2S_NUM_0); #endif static uint8_t *buffer = nullptr; // Pointer to hold the audio buffer. void setup() { delay(1000); // Delay for a moment to allow the system to stabilize. auto cfg = M5.config(); cfg.serial_baudrate = 115200; M5.begin(cfg); // Initialize the EchoBase with ATOMS3 pinmap. #if defined(CONFIG_IDF_TARGET_ESP32S3) if (!echobase.init(44100 /*Sample Rate*/, 38 /*I2C SDA*/, 39 /*I2C SCL*/, 7 /*I2S DIN*/, 6 /*I2S WS*/, 5 /*I2S DOUT*/, 8 /*I2S BCK*/, Wire) != 0) { Serial.println("Failed to initialize EchoBase!"); while (true) { delay(1000); } } #elif defined(CONFIG_IDF_TARGET_ESP32) // Initialize the EchoBase with ATOM pinmap. if (!echobase.init(44100 /*Sample Rate*/, 25 /*I2C SDA*/, 21 /*I2C SCL*/, 23 /*I2S DIN*/, 19 /*I2S WS*/, 22 /*I2S DOUT*/, 33 /*I2S BCK*/, Wire) != 0) { Serial.println("Failed to initialize EchoBase!"); while (true) { delay(1000); } } #endif echobase.setSpeakerVolume(80); // Set speaker volume to 70%. echobase.setMicGain(ES8311_MIC_GAIN_0DB); // Set microphone gain to 0dB. buffer = (uint8_t *)malloc(RECORD_SIZE); // Allocate memory for the record buffer. // Check if memory allocation was successful. if (buffer == nullptr) { // If memory allocation fails, enter an infinite loop. while (true) { Serial.println("Failed to allocate memory :("); delay(1000); } } Serial.println("EchoBase ready, start recording and playing!"); // M5.Speaker.tone(2000, 2000); // delay(2000); } void loop() { Serial.println("Start recording..."); // Recording echobase.setMute(false); echobase.record(buffer, RECORD_SIZE); // Record audio into buffer. delay(100); Serial.println("Start playing..."); // Playing echobase.setMute(false); delay(10); echobase.play(buffer, RECORD_SIZE); // Play audio from buffer. //M5.Speaker.playRaw(buffer, RECORD_SIZE, 44100, false, 1, 0); delay(100); }
  • For topics on the M5Stack Atom.

    257 Topics
    845 Posts
    kurikoK
    @wwhite https://docs.m5stack.com/en/guide/realtime/openai/atomic_echo_base
  • How to scale a bitmap drawn with M5.Display.drawBitmap() on M5Stack?

    1
    1
    0 Votes
    1 Posts
    477 Views
    No one has replied
  • Tab 5, how to enable Lora?

    5
    0 Votes
    5 Posts
    2k Views
    H
    @easytarget thank you. That is indeed an option. In my experience not to much work to get a Lora module working. We have a number of them in the field. But we would like the tab5 not become thicker as it is. We are now considering to place an Heltec Lora inside. Maybe that could work. Regards.
  • PaperS3 anyone got the touchscreen to be more sensitive?

    1
    0 Votes
    1 Posts
    369 Views
    No one has replied
  • cardputer adv JTAG/serial debug unit no puerto com cual es la solucion

    1
    0 Votes
    1 Posts
    393 Views
    No one has replied
  • Tab5: disable speaker when headphones are plugged in

    3
    0 Votes
    3 Posts
    1k Views
    M
    Thank you! I was not precise enough in my earlier post: I had already found the code to detect the connected headphones, the part that I was missing was how to turn off the speaker as soon as the headphones are detected (and if it was possible to turn it off independently from the speaker). Thanks to your comment and some poking around on GitHub I realized that I overlooked the GPIO extension. There is a SPK_EN pin there (Pin 1 on the first extension) that connects to the onboard amplifier and, according to its datasheet, can be used to turn the amplifier off. Since the headphones are not connected to the amplifier, this should mute the speaker without influencing the headphones - I haven't tried it yet, but that's my guess based on the schematics.
  • Bluetooth Serial for Tab5

    3
    0 Votes
    3 Posts
    1k Views
    easytargetE
    Hi @MortenComadan ; you don't mention what your project is based on for code; Arduino/ESP-IDF/MicroPython/UFlow2 etc.. For the tools where Expressif have got involved the support should be there already. The C6 co-processor gets a standard firmware (that talks via QSPI to the P4) and the P4 IDF libraries know how to use this. What I'm unsure about is exactly which features are actually implemented in the ESP IDF; I want to use bluetooth audio sink features.. eventually. If (like me) you are into MicroPython then good news. V1.27.0 was released a couple of days ago and has official P4 support: https://github.com/micropython/micropython/releases/tag/v1.27.0 UFlow2 is based on an older micropython version; I'm not sure how much of the P4 stuff they may have backported. I only got my Tab5 today, I'm going to be installing micropython 1.27 asap.
  • Re: Bluetooth Serial for Tab5

    1
    0 Votes
    1 Posts
    457 Views
    No one has replied
  • Tab5 Bootlooping

    4
    0 Votes
    4 Posts
    2k Views
    R
    @robski Make sure the USB-C port has enough power to meet the Tab 5's power requirements. Try different USB ports, as some may be underpowered. Also, consider if too many devices are hogging power or if the port is under-spec for the Tab5.
  • CardputerADV Audio

    1
    0 Votes
    1 Posts
    516 Views
    No one has replied
  • Flashlight Module: How to use it with PWM

    2
    0 Votes
    2 Posts
    2k Views
    M
    Dear Simone, I also stumbled upon this issue. I finally figured out that the m5stack Unit Flashlight module has two operation modes. It defaults to FLASH which is controlled by some custom logic which can be found here: https://github.com/m5stack/M5Unit-FlashLight/blob/main/SetFlashTimeAndBrightness/SetFlashTimeAndBrightness.ino But you can open the device and switch it to TORCH mode using a physical switch inside. Then you can use PWM to control it. The details regarding the operation modes and PWM can be found in the specs starting at page 12: https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/unit/FlashLight/FLASHLEDDRIVER_2019-07-01.PDF This will hopefully help others stumbling upon this. Best regards
  • UWB U100 slow positioning/ranging behavior

    2
    1 Votes
    2 Posts
    2k Views
    H
    @thatonecheetah I have exactly the same issue. Did you find a solution to that? would love to know. thank you
  • 0 Votes
    5 Posts
    2k Views
    M
    Hello felmue, When PLC was disconnected the power supply. time.tm_wday cannot remember. Other are correct. But PLC got the power supply. It worked normally as below code. char Text[100]; static struct tm time; char DayOfWeek[7][10] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}; char MonthOfYear[12][4] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; sprintf(Text, "%s, %d %s %d %02d:%02d:%02d", DayOfWeek[time.tm_wday], time.tm_mday, MonthOfYear[time.tm_mon], time.tm_year + 1902, time.tm_hour, time.tm_min, time.tm_sec); Serial.print(Text); Result Wednesday, 19 Nov 2025 16:38:35 Thank you
  • AirQ eazydata

    1
    0 Votes
    1 Posts
    429 Views
    No one has replied
  • [LLM-8850] Is there something wrong in axcl_demo with depth-Anything ?

    4
    0 Votes
    4 Posts
    1k Views
    P
    There something interesting. DepthAnything can be done with THIS In OpenAI API, I think Mr. uzuki_aoba already post in Qiita. In the CMD that renew the model list got some TYPO "sudo systemctrl restart llm-openai-api" I try LLM(qwen3), Whisper(CN), MeloTTS(CN), VLM(InternVL), they are work great with StackFlow that I can call by another computer in my house. But I think it something funny when I install llm-model-internVL. In apt I called is internvl____axcl, but after install the folder name came to internvl____AX650. (In the end, I change the folder name manually...)
  • AirQuality v1.1 restarts roughly every minute

    2
    0 Votes
    2 Posts
    606 Views
    robskiR
    you can disable sound and adjust timer, 60s for reset is default it does flash black like many ink displays
  • TAB5: Unable to mount SD card as USB mass storage

    5
    0 Votes
    5 Posts
    3k Views
    tinyu806T
    Using this example is fine. https://github.com/espressif/esp-idf/tree/master/examples/peripherals/usb/device/tusb_msc sdkconfig.defaults # This file was generated using idf.py save-defconfig. It can be edited manually. # Espressif IoT Development Framework (ESP-IDF) 5.5.1 Project Minimal Configuration # CONFIG_IDF_TARGET="esp32p4" CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y CONFIG_PARTITION_TABLE_CUSTOM=y CONFIG_EXAMPLE_STORAGE_MEDIA_SDMMC=y CONFIG_EXAMPLE_SD_PWR_CTRL_LDO_INTERNAL_IO=n CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y CONFIG_FATFS_LFN_HEAP=y CONFIG_WL_SECTOR_SIZE_512=y CONFIG_WL_SECTOR_MODE_PERF=y CONFIG_TINYUSB_MSC_ENABLED=y
  • Using 6060 Push

    4
    0 Votes
    4 Posts
    1k Views
    robskiR
    general rule for RS485 bus is the same baudrate and parity on all slave devices and each device with different slave ID, max 32 devices on one chain
  • BugC2_Slave WiFi Default Password

    1
    0 Votes
    1 Posts
    485 Views
    No one has replied
  • Getting a battery to work to power an M5 Tough?

    4
    0 Votes
    4 Posts
    2k Views
    L
    It sounds like the M5 Tough’s battery issues were likely caused by a polarity or connector mismatch—there’s no strict standard for that battery plug, so reversing positive and negative can easily overheat or damage the board. Before powering up again, double-check the connector pinout with a multimeter, ensure your LiPo has proper protection circuitry and matches the expected 3.7–4.2 V range, and avoid using USB and battery power simultaneously until you confirm how the board switches between them. A proper match should let the Tough run smoothly on battery without overheating or shutting down.
  • M5Tab Running out of memory error

    1
    1
    0 Votes
    1 Posts
    621 Views
    No one has replied