🤖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
  • LLM SKU: M140 Discontinued and now what

    2
    0 Votes
    2 Posts
    2k Views
    ajb2k3A
    @mumin50 They are releasing it as part of an upgrade kit with an adapter board that should be out next Friday. https://docs.m5stack.com/en/module/Module LLM Kit
  • AirQ VOC measurements

    3
    0 Votes
    3 Posts
    2k Views
    I
    @rictim thanks for pointing this out. I already guessed that fan isn't functioning in battery mode and thought of using the connector. But it looks like I need to hook them up to a USB battery pack for VOC. Assuming the sensors work also better when the fan works.
  • SPI on M5dial but i cannot use I2C port

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • How to disable M5stack fire power saving

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Need advice for a Camera.

    2
    0 Votes
    2 Posts
    1k Views
    kurikoK
    @QuiqueMartinez We don't have any camera model with night vision
  • DLight keeps giving max value

    1
    1 Votes
    1 Posts
    914 Views
    No one has replied
  • Controller that can be powered with 5v through GROVE

    5
    0 Votes
    5 Posts
    2k Views
    A
    @felmue Thank you! I learned something today by downloading the PDF's and applying what you explained :)
  • Cardputer keeps restarting.

    9
    0 Votes
    9 Posts
    5k Views
    robskiR
    @anubisdarkwatch said in Cardputer keeps restarting.: @robski So with another firmware it was showing as having 98% charge, I just loaded UIFlow2 and it showed as 22%. Weird. So I have it charging now, hopefully that is the issue. think it charges battery when connected and ON/OFF switch in ON position
  • 0 Votes
    5 Posts
    2k Views
    O
    @felmue You're absolutely right about VBUS. When I flashed the example firmware from the Arduino IDE, the power supply worked normally. However, the factory firmware did not. How the hell is it possible that such a thing isn't described anywhere in the documentation? Thank you, you really helped me a lot.
  • cfg.clear_display=false has no effect on PaperS3?

    3
    0 Votes
    3 Posts
    2k Views
    felmueF
    Hello @wsanders this issue has been fixed in recent M5Unified and M5GFX libraries - see here. Make sure you are using the latest versions of these two libraries. BTW: I am using this feature in my non flickering RTC clock example - see here. Thanks Felix
  • Sending MIDI Signal via USB on M5Dial – Need Help!

    2
    0 Votes
    2 Posts
    1k Views
    H
    Unfortunately you did not post your code so no one knows how you try to send the midi messages. Check first: does the device apear as USB-MIDI-Class in your computers device manager? Probably it is shown as a USB-Serial-Class device (which MIDI indeed is) but your MIDI application (seems to be a top secret application as you don't wrote which one) expect a MIDI-Class device. Maybe this helps: https://github.com/esp32beans/ESP32USBMIDI
  • Sim800l

    13
    0 Votes
    13 Posts
    39k Views
    felmueF
    Hello @cepics try changing the line to: Serial2.printf("AT+CSTT=\"%s\",\"%s\",\"%s\"\r\n", apn, user, pass); Thanks Felix
  • M5Paper loosing power completely

    5
    0 Votes
    5 Posts
    2k Views
    Z
    Looks like it has to do something with the bootloader. I previously flashed the full factory-firmware which comes out of ESHome(platformio) build, but if I just flash the firmware to 0x10000, then it boots up all the time from battery as well. Needs more digging what could go wrong with platformio bootloader.
  • CoreS3 adding a External Speaker? or use bluetooth?

    1
    0 Votes
    1 Posts
    914 Views
    No one has replied
  • U111-B NB IoT Module

    1
    0 Votes
    1 Posts
    777 Views
    No one has replied
  • AtomS3R Ext proto

    1
    0 Votes
    1 Posts
    716 Views
    No one has replied
  • M5Stack Core S3 Access to SDCARD Micropython

    2
    0 Votes
    2 Posts
    2k Views
    L
    @LordInchcape Using M5CoreS3_SDCard_read_dir_UIFlow2.0.4 the following micropython will work:- *import machine import os card = machine.SDCard(slot=2, sck=36, miso=35, mosi=37, cs=4, freq=1000000) os.mount(card,"/sd") print(os.listdir("/sd")) f = open("/sd/test.txt", "w") f.write("Hello world\r\n") f.close() g = open("/sd/test.txt", "r") print(g.read()) g.close() os.unlink("/sd/test.txt")** Still to determine if it treads on something else.
  • How to connect SIM7020G to the network?

    8
    0 Votes
    8 Posts
    8k Views
    felmueF
    Hello @silentrain23 I think you probably just need to wait a bit longer for it to register. From the AT Command document (link here) the 2 in the AT+CREG 0,2 response means: Not registered, but MT is currently searching a new operator to register to Thanks Felix
  • 0 Votes
    1 Posts
    2k Views
    No one has replied
  • M5.Power.getBatteryLevel() returns 0 when using Power.lightSleep etc.

    1
    0 Votes
    1 Posts
    856 Views
    No one has replied