🤖Have you ever tried Chat.M5Stack.com before asking??😎
  • Atomic Audio Base with M5ATOMS3R

    4
    0 Votes
    4 Posts
    234 Views
    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); }
  • UIFlow 2.0 support on Base X

    2
    2 Votes
    2 Posts
    747 Views
    A
    Unfortunately I can't see Base X in UIFlow 1.0 either. It looks like it got deleted from UI Flow several times: https://community.m5stack.com/topic/3534/why-the-newest-uiflow-does-not-support-basex-anymore I bought this (with the M5GO kit as well) to use with UIFlow for my child to control Lego. There was no warning when buying that this wasn't a supported system anymore. Should I return it? Unfortunately not a great first experience with M5Stack.
  • Atomic Motion Base in UIFlow2: Pulse width limits

    1
    0 Votes
    1 Posts
    273 Views
    No one has replied
  • 0 Votes
    1 Posts
    809 Views
    No one has replied
  • ATOMIC PoE Base W5500 POE+DHCP doesn't work

    4
    0 Votes
    4 Posts
    3k Views
    felmueF
    Hello @xgonc no, I did not try any other Ethernet library. Thanks Felix
  • QRCode2 is hot

    4
    0 Votes
    4 Posts
    2k Views
    G
    @yuyun2000 Hi, I used the chat, but it didn’t help. I’m using a similar code with Pulse mode: AtomS3 Lite + QRCode2 Base = 230mA AtomS3 Lite + QRCode1.1 Base = 75mA That’s too big of a difference when using a battery. import os, sys, io import M5 from M5 import * import time from base import AtomicQRCode2Base base_qrcode2 = None def setup(): global base_qrcode2, data M5.begin() base_qrcode2 = AtomicQRCode2Base(2, 5, 6, 7) base_qrcode2.set_trigger_mode(base_qrcode2.TRIGGER_MODE_PULSE) base_qrcode2.set_trig(0) time.sleep_ms(30) base_qrcode2.set_trig(1) print('take measurements') def loop(): global base_qrcode2, data time.sleep_ms(30)
  • Set hostname using W5500

    3
    0 Votes
    3 Posts
    3k Views
    felmueF
    Hello @hacxx please stop posting incorrect / not very useful information. W5500 is different from ENC28J60 and therefore EthernetENC or UIPEthernet library cannot be used for W5500. Thank you. Thanks Felix
  • File "base/stepmotor.py", line 1, in __init__ ValueError: invalid pin

    5
    2
    0 Votes
    5 Posts
    3k Views
    felmueF
    Hello @Schnoble clever! Maybe you could put your modified version into an Execute mpy code (eg. import)? This block can be found under System. Thanks Felix
  • Atomic QRCode Base start_decode() VS set_trig()

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Atom Motion V1.1 Problem

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Atomic Echo Base with AtomS3 or other Atoms for OpenAI

    1
    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • ATOMIC SPK Base (NS4168) UIFlow2 examples?

    3
    1
    0 Votes
    3 Posts
    3k Views
    P
    The ATOMIC SPK Base (NS4168) with UIFlow2 is compatible with various example projects for robotics and IoT. You can find UIFlow2 examples on the official Atomic Pi documentation or their GitHub repository for ready-to-use sample codes.
  • Atomic Motion with Atom S3 IMU - MicroPython

    2
    1 Votes
    2 Posts
    3k Views
    K
    My guess is no, since I can't get it to work.
  • Screws

    2
    0 Votes
    2 Posts
    3k Views
    ajb2k3A
    @franzhoepfinger M3 Socket cap bolts are generally easy to buy anywhere online and you can often get them for cheap on Amazon. The kits are only so you can work out what size M3 socket cap /hex Cap screw you may need
  • PLC Module

    Moved
    14
    0 Votes
    14 Posts
    38k Views
    F
    @franzhoepfinger https://github.com/Fliegl-Agrartechnik-GmbH/M5_COMMS here some PCBs for test. will post results there.
  • m5Dial Serial connection unstable

    3
    0 Votes
    3 Posts
    3k Views
    ajb2k3A
    @teastain Have you tried a new cable?
  • Base M5GO BOTTOM: Issues with UART (Port C)

    11
    0 Votes
    11 Posts
    31k Views
    X
    @jpk said in Base M5GO BOTTOM: Issues with UART (Port C): the current HW implementation reduces the voltage level on the UART/Port C to 1.5V I found my base bottom of m5stack fire have these 240 ohm (marking 241) pull down resistors too. will them interfere the PSRAM function?
  • DIN Base power issue

    2
    0 Votes
    2 Posts
    3k Views
    H
    @alien This is an intersting issue. Following....
  • ATOM STEP MOTOR and UiFlow questions

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Motion kit or Motion base?

    2
    0 Votes
    2 Posts
    3k Views
    M
    @werner_g One comes withe the ATOM controller, one does not.