🤖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?
  • None of the Faces examples work

    6
    0 Votes
    6 Posts
    15k Views
    R
    Thanks, I'll give those a try
  • 詢問 I2C 的位址衝突問題?

    Moved
    3
    0 Votes
    3 Posts
    6k Views
    m5-docsM
    @saka MPU9250 接了 GPIO 21, GPIO22 如果 DS3231 接 G21, G22, 之外的引脚的话,可以不冲突。 使用不同的 IICx
  • M5Stick Gray auto turn off after period of time.

    8
    0 Votes
    8 Posts
    14k Views
    S
    I've sent it back to shop and they confirmed it's device problem. And they replace with new one. Now no any problem.
  • Stack two battery module

    Moved
    4
    0 Votes
    4 Posts
    5k Views
    m5-docsM
    @cepics It's best not to stack two battery module with different capacity together. http://forum.m5stack.com/topic/739/can-i-stack-battery-module-and-plus-unit-at-the-same-time
  • Unit PLC

    3
    0 Votes
    3 Posts
    5k Views
    ajb2k3A
    @angelroyo please reply in home language if not English or use google translate to transfer to English
  • Where is LAN Module example??

    lan module
    10
    0 Votes
    10 Posts
    28k Views
    M
    Hi! Here is an example (Korean but you can using code, Simple Chat Server) https://www.wiznetian.com/m5stack-lan-모듈을-이용한-간단한-채팅-서버-만들기/ And I will publish this document in English as soon as possible. :D
  • Not Connecting to Wifi - First Setup

    10
    0 Votes
    10 Posts
    19k Views
    M
    I had the same problem. But I did decide to rename all my APs and every device connected. 30 minutes later, still can't get a device code, and it seems like it got stuck booting into the "Press next for instructions" screen, so I can't change the wifi if I wanted to :(
  • M5Camera Firmware request.

    5
    0 Votes
    5 Posts
    6k Views
    ajb2k3A
    @heybin I’m sorry, I don’t understand why when you have it working for the stick and the stack. Looks like it’s time for M5Stack to build a UIFLOW port of the firmware for the camera. If you build it from the sicks firmware then half the work is done for you!
  • turning off the m5stick

    5
    0 Votes
    5 Posts
    13k Views
    J
    awesome. got it to work now. thanks again!
  • Power on 5V pin when switched off

    8
    0 Votes
    8 Posts
    18k Views
    W
    PS: The battery drain is not caused by the IP5306 itself, but by all the load is attached to (the 2V power the EA3036 on the main unit and the AMS1117 on the Lora)
  • Pinout of TFT display

    5
    0 Votes
    5 Posts
    14k Views
    loborisL
    @mrtarantl said in Pinout of TFT display: Thanks :D i am aware of that... I was searching for a pinout of this The contacts are not damaged, it should be easy to solder it again on the board and it will probably work again... Of course, if you have minimal soldering skills...
  • 0 Votes
    5 Posts
    10k Views
    MrTarantlM
    @ajb2k3 yes I did use the cooling module as well. My thought was that there probably is some electrical interference when using the stepper and the servo module together. My solution in that case will be that i disconnect the mbus from the voltage regulator +wire completely to only power the steppers with the external power supply and do the rest with usb power to the m5Stack, so i am safe :D
  • PCB Reference Designators Documentation

    6
    0 Votes
    6 Posts
    14k Views
    P
    A component designator only makes sense if you have the correct schematic.
  • M5ez scrolling through lines on canvas?

    3
    0 Votes
    3 Posts
    9k Views
    B
    Have the ezTimeLog example loaded up. It is printing lines at the bottom of the canvas, and shifting previously printed lines up, indeed just like a terminal screen watching serial output. I think I misunderstood the scrolling functionality as the ability to use buttons to go back through the history at the top that had already scrolled off the screen. I see in issue #24 you say "canvas.print creates a buffer in memory that stores every print until it has scrolled off the screen", so that's not the way it works - sorry for my confusion. Indeed, creating menu items that don't do anything would be a possible solution. I tried that early on, but found that once the menu was drawn (or run), it merely sits and waits for buttons. I have not tried creating a function that does an .addItem, then runs the menu again, and run that function with an .addEvent. I'll give that a try as soon as possible. Is there a limit to the number of menu items, other than memory constraints? If I'm successful getting the "menu" to redraw, I'll let you know, and I guess I'll see what the limits might be! Thanks so much, @rop, your work is very appreciated!!!
  • Optical stepper motor test.

    6
    0 Votes
    6 Posts
    7k Views
    ajb2k3A
    @watson said in Optical stepper motor test.: @ajb2k3 Hello,I can not get your code in this post. You also need to tune the drives way down low as it causes to steppers to overheat
  • A comparison of M5Stack/Stick Models.

    12
    0 Votes
    12 Posts
    17k Views
    m5-docsM
    Oh, I see the 150mAh battery [image: 1547602773211-core_comparison-resized.png]
  • No GPS unit examples?

    14
    0 Votes
    14 Posts
    31k Views
    yelloweliseY
    GOOOOOOD!!! Works fine for me! tnx very much!
  • Improved Version of M5Stack Thermal Unit MLX90640

    1
    0 Votes
    1 Posts
    4k Views
    No one has replied
  • M5Fire - No USB COM.

    9
    0 Votes
    9 Posts
    16k Views
    J
    My case (Fire version) does not allow me to reach the internal connector from the outside. I've ordered a grey "version".
  • Button Unit Issue testing help please.

    3
    0 Votes
    3 Posts
    4k Views
    ajb2k3A
    @lukasmaximus said in Button Unit Issue testing help please.: I have tested the blocks associated with the single button unit and they definitely need some work. Button press c shaped block only allows for a single press or release and the jigsaw shaped block when combined with an if condition it throws an error that btn0_wasReleased or wasPressed is not defined. These issues will be resolved in the next update and hopefully some extra functionality added. Yeh, I was getting the btn0 is not defined error.