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

Subcategories

  • 551 Topics
    2k Posts
    H
    @Danieldsouza I prefer to use KiCAD for schematic and PCB design. The software is open source It runs on Windows, Linux, Mac there is a strong community there is a ton of libraries for thousands of components some part distributor and assembling factories provide their own library or allow symbol and footprint download making your own symbols and footprints is very easy design rule checking I am not an advanced user but managed to make a 4-layer PCB after watching a few tutorial videos. Independend of the EDA Tool make sure you avoid the common tripping hazard like missing blocking caps or unwanted ground loops.
  • When you meet problems using M5Stack, we help you solve it.

    201 Topics
    990 Posts
    S
    不小心下载了一个imu什么的……咔咔一顿后……我关了重新开……,但还是不会动,只会左右动,然后跳舞的话只会亮灯,不会动,只能左右转动……
  • 505 Topics
    2k Posts
    D
    Hopefully I can shed a little light on this topic. The AIN4-20mA unit uses a STM32 processor to handle the I2C interface in software. For some reason, the timing is not wholly compatible with the Raspberry Pi kernel I2C drivers. However, the Espressif I2C implementation is a lot more tolerant and flexible and works just fine. That's why it works with the M5 controllers. There was a an update to the github repo for this unit's firmware (https://github.com/m5stack/M5Module-4-20mA-Internal-FW) which changed the I2C library that was used. It's possible that this will fix it, but I haven't bothered to set up a STM32 development system to try it. If you really want to use a Pi or other Linux host board, you could use any inexpensive ESP device (like an M5Stamp) as a go-between. Another option is to use something like the Arduino UNO Q, which runs Linux on the main processor and allows you to run C++ code on the STM32 microcontroller to talk to I2C devices. It's really better to run real-time control on a separate microcontroller anyway.
  • 1k Topics
    6k Posts
    felmueF
    Hello @YO3HJV yes, I measured the current from the battery with this mA-meter and also used the AXP192 registers. Thanks Felix
  • 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.

    260 Topics
    849 Posts
    K
    After a lot of testing and searching it became apparent that the M5Atom controller did not work properly (never had this type of problem before). This, outdated software and some wrong suggestions by both ChatGPT and the AI bot from M5Stack (with the knowledge base available) made it a bit of struggle. However, after all updates and testing different hardware it finally works again. So thanks to anyone that spent time on this!
  • M5.Power.getBatteryLevel() returns 0 when using Power.lightSleep etc.

    1
    0 Votes
    1 Posts
    922 Views
    No one has replied
  • PaperS3 with M5United?

    6
    0 Votes
    6 Posts
    4k Views
    W
    @felmue I did not see that error. The afterimages have gone away. Leaving the screen all black and powered off a few minutes will help clear it, this is common EPD behavior.
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • [SOLVED] Can't Run Paper S3 With BarGraph Example

    2
    2
    0 Votes
    2 Posts
    2k Views
    W
    I got the bar graph demo to work: Using the latest M5 board package, you should see a board "M5PaperS3", so the requirement to downgrade the esp32 board package to 3.0.6 is not necessary. Use the "M5PaperS3" board definition instead of the generic ESP32S3 one. The instructions to install epdiy are somewhat vague. Simply clone the epdiy library to your arduino library directory and it will work, doing a "make" is not necessary. Follow the rest of the instructions at https://docs.m5stack.com/en/arduino/m5papers3/program, pay careful attention to the special board settings for OPI PSRAM, etc.
  • M5 Dial Portable Power Questions

    6
    0 Votes
    6 Posts
    6k Views
    P
    @PharkieB My idea, above, works! Now, I can turn ON my Lipo-powered M5Stack Dial with the "Wake" (front button), it loads my UI Flow program, and then I can tell the software (btn A) to switch it OFF, when that's appropriate: [image: 1734885872623-screenshot-2024-12-22-at-16.40.40.png] [image: 1734885873073-screenshot-2024-12-22-at-16.40.54.png] This is using the "System >> Execute mpy code" block with this for on: hold_pin = Pin(46, Pin.OUT) hold_pin.value(1) and this for off hold_pin = Pin(46, Pin.OUT) hold_pin.value(0) Ideally this would be a standard UI Flow block for the M5Dial (keep device on once awake and on battery). It seems odd I've had to invent it, based on detail in the documentation.
  • Can i run M5stack paper while connected to the battery?

    3
    0 Votes
    3 Posts
    2k Views
    H
    @ScheduleDisplay Connecting to always ON USB Power will permanent charge your battery and hold it at fully charged level. Not the best state to store a lithium battery over longer time. Best will be to remove it (or at least disconnect).
  • m5unit v2 - does i2c sensor work it?

    2
    0 Votes
    2 Posts
    1k Views
    kurikoK
    @mustafa98s I don't recommend you do this... it will make you mentally broken
  • Sources Debian CoreMP135

    3
    0 Votes
    3 Posts
    1k Views
    kurikoK
    @Trifunik there is a script use to build Debian image https://github.com/m5stack/CoreMP135_buildroot-external-st/blob/st/2023.02.10/tools/creat_coremp135_debian12_image.sh
  • How to use both 2 I2C interface on StickC-Plus2?

    2
    0 Votes
    2 Posts
    2k Views
    kurikoK
    @俺がガンダムだ Look at the definition of TwoWire, number should be fixed
  • How to change the CoreMP135 boot logo image?

    10
    0 Votes
    10 Posts
    6k Views
    ajb2k3A
    @kuriko I’ve started writing a guide for it using the gimp image editor and the sample will be online nr Christmas (I hope)
  • 2 Votes
    3 Posts
    2k Views
    kurikoK
    @ajb2k3 i think the guide is quite enough, M5 already have it in documents. all i did was transplant the code for StickCPlus to StickCPlus2 and so...yeah https://github.com/kur1k0/M5-RoverC-for-StickCPlus2.git
  • ISO RS485 on M5dial

    11
    0 Votes
    11 Posts
    7k Views
    M
    @felmue Hi, felix i got it working finally. The issue is, on platformIO the library Arduinomodbus library and ArduinoRS485 library are the arduino ones and not the m5stack ones which is why i was getting error. A fix to this was to just replace the internal files of library to the m5stack ones from github. Thank you for the help.
  • K210 M12 Camera issues

    2
    0 Votes
    2 Posts
    2k Views
    H
    The UnitV/StickV (K210) Devices are serial devices. You need the MaixPy IDE to program and preview. The UnitV2 Devices are small Linux Computers and have a USB- and WiFi Network interface.
  • How do I charge the Cardputer?

    21
    1 Votes
    21 Posts
    32k Views
    felmueF
    Hello @Pajdzian I measure about 62 mA charging current (at the battery) when using M5Launcher and the same amount when running Cardputer UIFlow2 or Demo firmware (the one preloaded). So I am curious: what other firmware did give you a slower charging rate? Thanks Felix
  • PwrCAN max amps

    1
    0 Votes
    1 Posts
    926 Views
    No one has replied
  • 0 Votes
    12 Posts
    6k Views
    robskiR
    @PhilB79 said in M5CoreS3: "ERROR Device type unknown" when trying to connect both CoreS3 and CoreS3 SE to Server.: @teastain UIflow 2 / Select device / RED dot next to the CoreS3 graphic. Same applies to CoreS3 silly question but you are logged in to Uiflow2 with same login credentials as in M5Burner (bind)
  • CoreS3 and ENV Pro (BME688)

    7
    0 Votes
    7 Posts
    5k Views
    LuftwaffleL
    @aitech Dont' throw that sensor away yet. There is an error in the ENV_Pro demo code: Line 51 should read Wire.begin(); After changing that it worked fine for me. The interface address for the sensor is actually defined on line 57. Pretty impressive sensor.
  • thermometer with a 1-wire probe

    5
    0 Votes
    5 Posts
    2k Views
    D
    @ddhard I was thinking of using https://shop.m5stack.com/products/esp32-ethernet-unit-with-poe in terms of space. programming with UIFlow or Arduino IDE but I didn't see the esp32-ethernet-unit-with-poe controller in the UIFLOW list.
  • M5Dial : M5Burner can't do Burn

    6
    0 Votes
    6 Posts
    4k Views
    K
    Even when connecting the M5Dial to USB while holding the rear boot button, only one COM port is displayed. It’s unusual if two ports are not displayed, right?
  • Settimino and M5 Paper, interacting weirdly

    4
    0 Votes
    4 Posts
    3k Views
    namazu2024N
    @kdshawee87 Is there a possibility that it is conflicting with the Arduino macro? #define min(a,b) ((a)<(b)?(a):(b)) This is a rough way of writing it, but in the header #include <M5EPD.h> #include <Settimino.h> #undef min Will it compile if I undef it? However, in this case, the standard min cannot be used in this file.