🤖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?
  • UHF-RFID-UNIT-JRD-4035 output power adjustment method

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • UnitV2 fan cable connection

    3
    1
    0 Votes
    3 Posts
    4k Views
    O
    Hello @felmue , In fact I received answer from M5 support in the morning. I managed to solder the cable to the right place and now fan works. Thank you for your help! Here is the place: [image: 1645533710499-unnamed.jpeg]
  • M5Paper STL Files available?

    3
    0 Votes
    3 Posts
    6k Views
    M
    @lwtsde said in M5Paper STL Files available?: M5Paper Hello! It depends on the accuracy of the 3D Printer. M5 Paper requires high accuracy. You need a high-precision printer. The accuracy of the printer for amateurs is about 0.4mm width. I think it is impossible because the accuracy is low.
  • M5Stack Product Selector?

    2
    0 Votes
    2 Posts
    2k Views
    ajb2k3A
    The controller would need to be mounted outside where it won’t suffer from atmospheric changes. The Atom or the stamp will work if you just want to read a sensor and send MQTT messages to a server. What “wet” zone thermistors have you looked at? And as to monitoring rhe compressor, you could even get away with a microphone if the compressor is not also damp.
  • How to control lots of Neopixel

    30
    0 Votes
    30 Posts
    111k Views
    P
    wled on M5stack is easy I have tested it with ATOM LITE, ATOM U, and ATOM MATRIX especially ATOM MATRIX is easy it comes with the LED. Simply install via WEB https://install.wled.me
  • Stop JoyC from locking?

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • AWS or regular Core2 ?

    7
    0 Votes
    7 Posts
    10k Views
    ajb2k3A
    Indeed and it still works with AWS.
  • 0 Votes
    3 Posts
    6k Views
    V
    Hello! Please help me I still get this error: Check your network status and retry.. I have tried my phone's personal hotspot as well as the house WIFI. But still could not get the token. Please help would really much appreciate the help
  • Timer Camera X

    12
    0 Votes
    12 Posts
    30k Views
    M
    I have the m5 timer camera which is I believe the same board that is within the timer camera x housing. I have a micropython(at commit: 517e82eb6b7d93134637b5658132479f4fc260e3) build for it here: https://github.com/mocleiri/tensorflow-micropython-examples/actions/runs/1767505151 Scroll down and download the microlite-spiram-cam-esp32-firmware.zip file. Then flash using esptool; At least with mine you have to flash at 115200 or it won't work. esptool.py -p COM5 -b 115200 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size detect --flash_freq 40m 0x1000 bootloader/bootloader.bin 0x8000 partition_table/partition-table.bin 0x10000 micropython.bin This firmware gives you a 2 MB heap and leaves 2MB for use by the esp32-camera driver. The purpose of this firmware was to use the camera for the tensorflow lite for microcontrollers person detection example and we only capture a 96x96 image. But still it could be useful if you want a micropython firmware that works with the ov3660 camera and to experiment with. The main issue in getting this to work was to ensure the idf sdk config flag CONFIG_SPIRAM_USE_MALLOC was enabled. And then a change into micropython to cause the heap allocated to micropython to be 1/2 of the available SPIRAM. Both are only details if you make your own custom firmware. You should be able to pick up the firmware from the above action or if that is expired there will be a more recent one to use.
  • 0 Votes
    1 Posts
    2k Views
    No one has replied
  • Some questions...

    8
    0 Votes
    8 Posts
    8k Views
    ajb2k3A
    @felmue said in Some questions...: Hello @ajb2k3 I think you might still be thinking about the wrong module. (I know it's a bit confusing as both these modules are listed on the specs page.) The Stepmotor Driver Module (HR8825) uses an TCA9554 and not an STM32. So no open source firmware as far as I can see. Thanks Felix I think you may be thinking of the servo module as the ones I have and the product title shows AATMEGA328 [image: 1642866373912-screenshot-2022-01-22-at-15.44.52.png] the 13.2 uses the STM32
  • Stamp-C3 and I2C

    2
    0 Votes
    2 Posts
    4k Views
    felmueF
    Hello @Bram have a look at this thread. Thanks Felix
  • M5STICK-C - Windows 10 no longer recognizes it when plugged in.

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • 0 Votes
    1 Posts
    3k Views
    No one has replied
  • Lora Module - What plug is the external antenna using?

    2
    0 Votes
    2 Posts
    4k Views
    S
    Support have contacted me, it's an MCX connector! The one on the LoRa module is female, so the plug you buy needs to be an MCX Male connector. I've bought these converters for SMA plugs: https://www.amazon.co.uk/gp/product/B012THC0FO The MCX connector is exactly the same one as on most of the SDR USB sticks... https://www.amazon.co.uk/TenYua-Digital-Receiver-RTL2832U-R820T2 So if you already have a USB software defined radio hanging around, the rubbish little twig antenna can be cut off the cable, and it reused as a J antenna cable!
  • ATOMIC QR-CODE READER - Documentation - Trigger in Host Mode

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Is function of UHF-RFID-JRD-4035 only reading IC tag information ?

    3
    0 Votes
    3 Posts
    5k Views
    P
    @m5stack san, Thank you very much for your kindly reply!
  • How to get API key from unitv2

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Getting started with UnitV2

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • BASE26 compatibility with Core2?

    4
    0 Votes
    4 Posts
    6k Views
    m5stackM
    The vibration sensor of M5Core2 and M5 Base series are incompatible in mechanical design. Please do not stack them together.