🤖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
    L
    If you're planning to use an external 1S LiPo with the M5Core2 through BUS pins 1 and 30, it's worth checking the board schematic first. The community confirmed that pin 30 is directly connected to VBAT, so an external battery with the same voltage can work. One important tip is to avoid connecting two rechargeable batteries in parallel without proper protection. Discussions like this are why I keep coming back to the M5Stack community, and even Laptop Giant enjoys following practical hardware insights like these.
  • 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!
  • M5CAM GITHUB documentation does not match current pcb.

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • Arduino GUI "INCOMPATIBLE" examples?

    2
    0 Votes
    2 Posts
    5k Views
    B
    Yes, i have the same problem under win 8.1 64bit version. when including the file http://www.m5stack.com/support/master/package_m5stack_index.json and trying to include this, an error message occurs: http://www.m5stack.com/support/master/package_m5stack_index.json Dateisignaturprüfung fehlgeschlagen. Datei ignoriert. Under win 8.1 64 bit vers. it is not possible to ignore the file verification.
  • Have the camera, what now.

    13
    0 Votes
    13 Posts
    29k Views
    ajb2k3A
    @stoney 在 Have the camera, what now. 中说: @ajb2k3 Huh ? 192.168.4.1/jpg_stream Does not work Then next post you say it works ? You are being confusing lol, you can edit the posts if you want.. Nope it doesn't work however, reading the source code that you linked to and a bit of probing, I found the other info but mine seems to have overheated and died. I need to find someone to solder in some wires to bypass the usb>usart chip and I just cant get it to work. Is it supposed to only draw 0.1A? Just trying to work out why the esp32 is running hot.
  • micropython with ble

    7
    0 Votes
    7 Posts
    15k Views
    J
    Thanks for your help much appreciated.
  • [intermittent] Can't register at cloud.m5stack.com

    2
    0 Votes
    2 Posts
    4k Views
    A
    Actually I managed to register over the weekend and login to the cloud IDE. But now it's not letting me login again. I guess there are some intermittent problems. Andrew
  • M5Stack Official ESP32 Camera Module - Demo, Runtime Error

    16
    0 Votes
    16 Posts
    53k Views
    D
    @0x1abin The prebuilt firmware doesn't work for me either. I get this: I (362) heap_init: Initializing. RAM available for dynamic allocation: I (369) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (375) heap_init: At 3FFB9E48 len 000261B8 (152 KiB): DRAM I (381) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM I (387) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (394) heap_init: At 400907AC len 0000F854 (62 KiB): IRAM I (400) cpu_start: Pro cpu start user code I (194) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. E (306) camera_demo: Camera probe failed with error 0x20001 Faulty device?
  • M5STACK Camera

    1
    0 Votes
    1 Posts
    5k Views
    No one has replied
  • Replace cracked screen?

    6
    0 Votes
    6 Posts
    17k Views
    M
    I ordered a replacement screen from the M5Stack store on Aliexpress. New TFT display + bezel arrived 15 days later. Installation was reasonably straight forward. You'll need: Soldering iron - I'm using old faithful Jaycar Duratech TS-1554 20W/130W Solder - I'm using cheap 0.5mm Sn 63 / Pb 37 / Flux 1.2 Flux - I use a pen T6 Torx screwdriver - I have one of these sets Steps: Remove bottom battery/breakout board 2x T6 Torx screws hold the PCB in place Slide speaker out (careful of it's thin wires - I broke mine) Slide PCB sideways and lift slightly. The display ribbon cable prevents it from being fully removed Push the display + bezel from behind to detach it from the case Remove the bezel from the broken TFT Rotate the PCB 45 degrees and remove from plastic shell, to avoid damaging it Flip TFT 90 degrees revealing its flexible cable Detach the TFT by applying a little flux + solder and gently prying while heating the pins with a soldering iron Apply flux to the solder pads and stroke each with a soldering iron to create a smooth finish. There should already be enough solder remaining, if not, add a tiny bit more and stroke smooth Place the new TFT over the pins and precisely hold in place with your thumb while applying power to check the display works Solder pin 1, check alignment and adjust if need be Solder the remaining pins. Get some bright light and a magnifying glass and make sure none of the pins are bridged. Or use continuity mode on your multimeter to check adjacent pins Insert the PCB + new TFT back into the plastic case, slide PCB sideways and attach Torx screws. I accidentally detached one of the speaker wires earlier, so with the new TFT flipped out of the way, resoldered the speaker wire. In doing so, I detached the other speaker wire! So I swapped both for new thinker wire, salvaged from a Dupont ribbon cable. The wire can't be too think as it needs to sit between the TFT and PCB. Reseat the speaker Sit the TFT in place and remove the protective cover (green tab) being careful not to touch it with your oily fingers Remove the sticker from the back of the bezel and insert the 3 plastic buttons Attach the bezel onto the plastic case and press firmly Plug in USB and boot Press 3 push buttons to cycle through RGB colours It works!
  • M5Go versus M5Stack

    7
    0 Votes
    7 Posts
    26k Views
    W
    @jpilarski take a look at the I2C hub from Seeed; only problem is how many milliamps your I2C sensors need. My multichannel gas sensor (from Seeed) cannot run on the bus while the BME280 is on at the same time. btw addresses are configured properly.
  • Power behaviour

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • LoRa module and FACES keyboard

    1
    1 Votes
    1 Posts
    6k Views
    No one has replied
  • 0 Votes
    2 Posts
    4k Views
    ajb2k3A
    Way hay, I can program this this (in a wierd way) I have to use a 01.uf cap and a different ftdi adapter.
  • Connecting multiple I2C devices

    4
    0 Votes
    4 Posts
    13k Views
    C
    @wschnell 在 Connecting multiple I2C devices 中说: @calin those who use Grove certainly are. don't know... i never used that one... didn't even attempted...
  • Fire vs Gray?

    fire mpu6050 mpu9250
    3
    0 Votes
    3 Posts
    12k Views
    P
    from what I could find, the specs are identical except for 2 changes: the replacement of the 9250 with 2 chips (the MPU6050 and the MAG3110); and the upgrade of the battery (150 mAh to 600 mAh)
  • PID and VID of the M5Stack?

    2
    0 Votes
    2 Posts
    4k Views
    C
    @ajb2k3 在 PID and VID of the M5Stack? 中说: What is the PID and VID of the M5Stack? USB\VID_10C4&PID_EA60 [image: 1530137123907-vid_pid.png]
  • product suggestion - power plug bottom

    5
    0 Votes
    5 Posts
    14k Views
    W
    I can power it through my mobile phone charger or a battery pack, just using a tiny USB3 Adapter; and I can power it off my solar panel. I just like the idea of having a web server (or whatever else I made ...) that I can plug into an AC socket.
  • Powering M5Stack

    2
    0 Votes
    2 Posts
    5k Views
    RopR
    Can only be mechnical, meaning the connectors don't quite mate without the proto board in-between. Try pushing a little harder?
  • Bus Connector size? (not 2.54)

    2
    0 Votes
    2 Posts
    7k Views
    JJJ
    Hi @ajb2k3, I gather you are talking about the internal MBUS GPIO pins - that connect the modules together. The pin pitch - distance between the pins - is 2.54 but the pins are height reduced compared to those found on a standard GPIO header - too SHORT for Dupont connectors to attach. The MBUS pins are intentionally height reduced in order to minimise the overall height of the M5Stack. It is possible to source a third party full height 30 pin GPIO header if needed, or you can make one using a GPIO for Arduino or Raspi. You could get a PCB made to go with it, based on the files available on github, see here.
  • FAO Dimi - Product request 90 degree adapter board.

    2
    0 Votes
    2 Posts
    4k Views
    ajb2k3A
    [image: 1529224925616-m5rapr.png] Something like this (if you look closely you can see the software failed to make all connections.
  • SPI clash between LCD and nRF24L01

    14
    0 Votes
    14 Posts
    44k Views
    S
    Hello, thank you for your reply. I'v tried to only use the CS pin and it works, but... yes, there is always a but :-) the results are not very accurate. From the moment a set a brightness in the screen, the values of the temperatures grows. I try to read the temp in a separate task, but it didn't change anything. Here is my code #include "Adafruit_MAX31855.h" #include <SPI.h> #include <M5Stack.h> // Example creating a thermocouple instance with software SPI on any three // digital IO pins. #define MAXCS 17 Adafruit_MAX31855 thermocouple(MAXCS); void task1(void * pvParameters) { for (;;) { float avg = 0; /* Read nbReadToAvg times to make an average of the temp */ for (int i = 0; i < nbReadToAvg; i++) { float c = thermocouple.readCelsius(); avg = avg + c; delay(100); } avg = avg / nbReadToAvg; Serial.println(avg); } } void setup() { Serial.begin(115200); Serial.print("MOSI="); Serial.println(MOSI); Serial.print("MISO="); Serial.println(MISO); Serial.print("SCK="); Serial.println(SCK); Serial.print("SS="); Serial.println(SS); thermocouple.begin(); Serial.print("Internal Temp = "); Serial.println(thermocouple.readInternal()); while (!Serial) delay(1); // wait for Serial on Leonardo/Zero, etc Serial.println("MAX31855 Initializing ..."); // M5.Lcd.setTextColor(WHITE, BLACK); // wait for MAX chip to stabilize delay(1000); xTaskCreatePinnedToCore( task1, "task1", 4096, NULL, 1, NULL, 0 ); Serial.println("M5 begin without LCD"); M5.begin(false, false); delay(10000); Serial.println("LCD Start"); M5.Lcd.begin(); for(int j=0;j<100;j++) { //Serial.printf("Brigthness=%d\n", j); M5.Lcd.setBrightness(j); delay(200); } //delay(10000); Serial.println("LCD Shutdown set Brightness to 20"); M5.Lcd.setBrightness(10); //M5.Lcd.sleep(); M5.Lcd.setTextSize(4); M5.Lcd.print("test"); M5.update(); } void loop() { } And here is the result : 20.27 20.50 20.35 20.45 20.27 18.52 20.12 20.58 20.42 LCD Start 20.27 18.60 21.55 22.73 21.58 21.77 21.98 20.87 21.40 22.40 21.65 23.60 23.40 24.02 24.48 24.62 24.55 29.67 26.83 25.52 29.15 LCD Shutdown set Brightness to 20 23.48 22.27 22.15 21.50 22.92 20.50 21.67 22.60 21.92 22.12 22.42 Why can see that between the line LCD start and the LCD shutdown, the temperature grows and that why the brightness of the screen is increasing. After the line "LCD Shutdown" the brightness is set to 20 and the value are higher that the values at the beginning but they don't moved.