🤖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?
  • Microphone on m5go

    1
    0 Votes
    1 Posts
    5k Views
    No one has replied
  • 5V pin not working on a M5Stack core

    5
    0 Votes
    5 Posts
    13k Views
    dasloloD
    No response from the m5 team on twitter so I returned it through Amazon.
  • "Bottom" IO expander pinout

    3
    2
    0 Votes
    3 Posts
    15k Views
    M
    Thanks you so much for your reply ! So, right now I'm understanding that I will have half IO than expected... Thanks again, It helps me a lot See you
  • Overheat

    4
    0 Votes
    4 Posts
    9k Views
    JJJ
    @hypnos CP2014 controls the USB to serial connection.... COM port connection problems can result from other things: using the old driver (Windows), faulty USB cable, etc. However the CP2014 should NOT be so hot that you can't touch it and leave your finger there. Q - Is it that hot ? If it is, then yes perhaps don't use the battery with this unit. If the chip is super hot (and your COM port is working for other devices) you could also look to contact your supplier. I've tested lots of M5 units and use 4 regularly and have not had this problem. I also haven't heard of anyone else having this problem. If you get another M5 I would not at all expect this to happen again.
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Battery issue

    34
    3 Votes
    34 Posts
    204k Views
    m5stackM
    For those who have 'battery issue' with their M5Stack; please, use the 'contact now' button on any product page of our Aliexpress store to contact with our after-sale team. We will try our best to bring you a satisfying purchase experience.
  • M5Stack ESP32 revision

    7
    0 Votes
    7 Posts
    19k Views
    D
    @jimit sounds good! thank you.
  • External power to header ?

    6
    0 Votes
    6 Posts
    19k Views
    X
    @drwino :-) Good luck.
  • How to save data without SD card?

    2
    0 Votes
    2 Posts
    9k Views
    X
    use "Preferences" class #include <Preferences.h> Preferences preferences; void setup() { Serial.begin(115200); Serial.println(); // Open Preferences with my-app namespace. Each application module, library, etc // has to use a namespace name to prevent key name collisions. We will open storage in // RW-mode (second parameter has to be false). // Note: Namespace name is limited to 15 chars. preferences.begin("my-app", false); // Remove all preferences under the opened namespace //preferences.clear(); // Or remove the counter key only //preferences.remove("counter"); // Get the counter value, if the key does not exist, return a default value of 0 // Note: Key name is limited to 15 chars. unsigned int counter = preferences.getUInt("counter", 0); // Increase counter by 1 counter++; // Print the counter to Serial Monitor Serial.printf("Current counter value: %u\n", counter); // Store the counter to the Preferences preferences.putUInt("counter", counter); // Close the Preferences preferences.end(); // Wait 10 seconds Serial.println("Restarting in 10 seconds..."); delay(10000); // Restart ESP ESP.restart(); } void loop() {}
  • Flaky M5STACK-4M-PSRAM

    8
    0 Votes
    8 Posts
    18k Views
    dasloloD
    @jimit thanks for the link.
  • Charging the battery

    7
    0 Votes
    7 Posts
    24k Views
    K
    I am charging it with the ipad 1 charger. I have a meter and the wall wart is normally 5v, but the output amps is .3A and on the faces that i have it is .17A. It charges my other things just fine. I don't know why the amp draw is so low.
  • Battery fix found (sort of)

    7
    0 Votes
    7 Posts
    20k Views
    reaper7R
    @m5dude 在 Battery fix found (sort of) 中说: so i think the solution was spreading the pins and squeezing it together. The connections on the M5 core are weak. the same as I wrote here: http://forum.m5stack.com/topic/39/battery-issue/10 and here: http://forum.m5stack.com/topic/62/ip5306-automatic-standby/14
  • How to custom sell m5 firmwares?

    3
    0 Votes
    3 Posts
    9k Views
    M
    @m5stack this is exciting to here! be able to drop ship a custom preloaded m5 to customers would be amazing!
  • Emulation of games

    4
    0 Votes
    4 Posts
    16k Views
    K
    Thank you. I will check it out
  • M5Stack - AutoCAD Drawings

    15
    0 Votes
    15 Posts
    36k Views
    JJJ
    @kentinker Excellent. Probs a good idea to have a nice working link for the future. No worries - didn't mess me up. Good luck with the github - so far so good. Its very useful and powerful once you get into it. I will add your files up to my github later on.... thanks again.
  • Extrusion mould issue causes crack

    3
    0 Votes
    3 Posts
    9k Views
    on4aaO
    @m5stack No, not at all! It was just sitting on my desk and over the course of two days a crack appeared and gradually grew over the whole width. The other three edges show no problem. This is why I suspect a problem with the extrusion mould.
  • FCC/CE certification

    4
    0 Votes
    4 Posts
    12k Views
    m5stackM
    now only the basic/gray/panda got the fcc/ce, psram had not
  • Running without battery - power switch

    5
    0 Votes
    5 Posts
    20k Views
    J
    Is it easy to disable the MPU9250 so that I can use the pins as GPIO? In this case for an ethanol content sensor with pullup to 3.3V. Or would I be better with an M5stack without MPU9250? By adding a CAN transceiver inside, I will have a new twisted pair coming out of the case, but if I power through USB C and use Grove for GPIO I could get rid of all the pin headers and use a slimmer base. For an order in quantity of hundreds, what customisations are feasible? Having a unit with a CAN transceiver, no battery and a slimmer base already would probably cost less to manufacture, but it depends on the quantities to design another model.
  • M5Stack with CAN

    14
    0 Votes
    14 Posts
    47k Views
    J
    Another getting this for a CAN idea, after using CAN on other ESP32 modules. I am going to see if I can squeeze an SN65HVD230 board inside the enclosure and run without a battery.
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    3 Views
    No one has replied