馃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.

    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...
  • 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
    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.

    259 Topics
    847 Posts
    R
    Two years ago I set up 6 atom lites with moister sensors for my raised gardens. This year I added another garden. I have download the same program only with different client name and different topic to publish to. I'm using EMQX intergration within Home Assistant as my MQTT server. The Atom Lite logs into the server but is not publishing the topic for some reason. I went back to the old version of UIFlow that was working on the rest of my beds with the same results. I updated to the latest version of EMOX with the same effect. Does anyone have a clue as to what might be going on?
  • I2C Hub 1 to 6 with M5stickC

    12
    0 Votes
    12 Posts
    15k Views
    ajb2k3A
    @smh17 yeh, the issue is the internal power regulator chip.
  • M5stick TOF does not work

    3
    0 Votes
    3 Posts
    7k Views
    m5stackM
    maybe M5Stack Pin interface broken, you can program the GPIO, GPIO 26 to High level, then test it doesn normal. if have any question, pls contact our store. thanks
  • lorawan module: White Screen after lora.setDeviceMode(LWOTAA)

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • 0 Votes
    11 Posts
    29k Views
    K
    Thanks @alextil I'm glad I haven't (completely) lost my mind. I haven't had any progress with this issue besides creating a workaround with a Proto and some Grove ports- assembling a sort of..."Port Board." It certainly isn't pretty, but here's a pic for fun: [image: 1575484626076-portboard-cc.jpg] It's 2 "Port B"s - to accommodate devices that want GP26, GP36, or BOTH. And a simple male header to Serial2. (16/17) I've had some thoughts on other things to try (mostly in configuration or digging deeper into M5 and ESP32 libraries), but have been busy with another project that requires much smaller hardware. If you (or anyone) find something that in any way changes this functionality, please post. All info helps. -Atlas
  • External 5V direct connection

    3
    0 Votes
    3 Posts
    4k Views
    lukasmaximusL
    nice, any pics?
  • Problems with the I2C Grove Interface

    4
    0 Votes
    4 Posts
    14k Views
    T
    Hello, Did you end up finding a solution ? This is my issue and I think it may be related : Hello, I am trying to integrate a RTC module (DS3231). It works fine as long as I don't use the M5Stack library. As soon as I combine M5.begin() with Wire.begin() there seems to be a conflict. Scanning I2C reveals 2 devices : 0x57 - M5 LCD ? 0x68 - RTC Module DS3231 Any clue as to what is going wrong ? What PINS are used by the LCD ? I suppose 21 (SDA) and 18 (SCL) ? Kind Regards, Tony
  • My Wi-Fi requires both username and password.

    3
    0 Votes
    3 Posts
    9k Views
    ajb2k3A
    @al-mo you can specify the user name and password in the code. I cant remember how its down as I dont use Arduino (i just remember seing a demo) @lukasmaximus may know when he make it back on line.
  • Purchased a m5StickV - Fixed in recent firmware update.

    25
    0 Votes
    25 Posts
    92k Views
    X
    @thrasher latest Firmware fixes this. http://forum.m5stack.com/topic/1403/m5stickv-firmware_1017-upgrade
  • Missing module with my core M5 Basic ??

    10
    0 Votes
    10 Posts
    17k Views
    lukasmaximusL
    I didn't say it was clean, it's a workaround. You can buy grove to dupont converters. https://www.aliexpress.com/item/32801421897.html?spm=a2g0o.productlist.0.0.4612d357XRyxy0&algo_pvid=32f54ee3-80fd-47a2-8346-79292f9c97d6&algo_expid=32f54ee3-80fd-47a2-8346-79292f9c97d6-22&btsid=c43ffbaf-dfc6-4639-81cc-59bfa84bb838&ws_ab_test=searchweb0_0,searchweb201602_6,searchweb201603_52
  • How write multiple file in sd card by m5stack??

    2
    0 Votes
    2 Posts
    3k Views
    ajb2k3A
    You can only write 1 file at a time. Please bear with me as I鈥檓 currently testing and logging the A鈥檚 functionality
  • To switch off the M5Stick from code

    8
    0 Votes
    8 Posts
    19k Views
    Q
    There is a fix in the GitHub repo for Arduino https://github.com/m5stack/M5StickC/pull/52 .
  • Application M5 AC Socket

    2
    2
    0 Votes
    2 Posts
    5k Views
    ajb2k3A
    @skink said in Application M5 AC Socket: Hi at all, is there a test program or an EasyLoader program with which I test the M5 AC socket !? I have M5 stack with RS485 to TTL Unit or also a M5 Stick-C with M5StickC RS485 HAT. ! [image: 1570083025243-dsc_1122-resized.jpg] [image: 1570083067753-dsc_1123-resized.jpg] Thx! Skink The only known information is found here: https://docs.m5stack.com/#/en/app/ac_socket . I鈥檓 still waiting on one to be delivered
  • Detect When M5 is Powered by Battery?

    3
    0 Votes
    3 Posts
    5k Views
    J
    @lukasmaximus Thanks so much for your reply! Sorry I missed it. I found the Arduino sample and confirmed it works. Somehow I had been led to believe from issues on Github that it was only supported on Fire, but the battery sample works on my M5 Basic (black).
  • Mod to programmatically disable speaker whine/hiss.

    10
    0 Votes
    10 Posts
    30k Views
    F
    It is probably better not to connect PIN 1 of the NS4148 but pin 3 the buck converter EA3036 to pin 5 since otherwise you have a bigger power consumption. You could also remove R23 in that case.
  • BeetleC code?

    3
    0 Votes
    3 Posts
    8k Views
    L
    @ajb2k3 Thank you very much!!! :D :D
  • Are M5stack Grove sensors compatible with the Raspberry Pi?

    grove raspberry pi
    5
    0 Votes
    5 Posts
    16k Views
    M
    @ajb2k3 That's great news, thanks a 1,000,000
  • Application M5Stack Demo-Board (Factory-Test)

    7
    0 Votes
    7 Posts
    12k Views
    SkinkS
    @ajb2k3 said in Application M5Stack Demo-Board (Factory-Test): Try deleting the circle at the beginning of the line. I've already done that, erased the circle in front of the bracket. But nevertheless it runs only up to function 6! Just found out, that I get the following error message working with Arduino 1.8.9 when I load the code into Arduino !! Error message : "MFRC522_i2C.cpp" contains unknown characters. If the code was created with an older version of Arduino, you might want to use Tool -> Correct Coding & Reload etc. etc. to correct the code. But even afterwards the program runs only up to function 6!
  • new M5stack has different color map?

    1
    0 Votes
    1 Posts
    4k Views
    No one has replied
  • Accessories - no subcategory?

    2
    0 Votes
    2 Posts
    4k Views
    OyczEO
    in https://m5stack.com/collections/m5-module/products/proto-module Click on More Info and there is info about connections.
  • M5stack STEP 3D files

    10
    0 Votes
    10 Posts
    30k Views
    F
    @krso said in M5stack STEP 3D files: Hi M5stack. Would it be possible to add STEP 3D models to all products. It's very convenient for project planning. Regards https://github.com/m5stack/M5-3D_and_PCB https://github.com/Octo8080/M5Watch-ExMounter/blob/master/README.md