🤖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?
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    71 Views
    No one has replied
  • Stamp Pico connected to ESP32 Downloader - nothing happens

    4
    0 Votes
    4 Posts
    4k Views
    N
    Thanks to both of you who replied, I got it working with your help! The problem was the port I was connecting to. Using a USB-A to USB-C cable, connected to the Mac Mini M1's USB-A port got it to work and the device now shows up as /dev/tty.wchusbserialXXXXX Very happy about this, just in time before the weekend. ;) Thanks again!
  • Outdoor mounting/enclosure for M5Stamp C3 Mate?

    2
    0 Votes
    2 Posts
    2k Views
    ajb2k3A
    @taako What country are you in and what are the wiring regulations? you want a waterproof and wether resistant box along with cable glads for the power cable which prevent the ingress of water and critters.
  • How much does does 3D Antenna help with RSSI?

    3
    0 Votes
    3 Posts
    3k Views
    T
    @holofloh You weren't lying... Great results with M5Stamp C3 If anyone comes across this thread who are also disappointed by their generic WROOM-32 modules. Just buy the M5Stamp C3, they aren't much more (actually the same price when compared to the generic WROOM-32 modules on amazon!!) and they made my phone RSSI go from -80ish to -60 at the same distance and lower transmission power! My Watch transmission power i kept the same but it went from -85 to -60ish as well! That's a truly insane gain for such a small little thing. The generic modules trace antenna just doesn't cut it! Plus they have a fun RGB LED you can configure! I'm convinced, I'm going full M5Stamp!
  • M5Paper won't execute loaded programs

    10
    0 Votes
    10 Posts
    14k Views
    C
    At a glance I would say commenting out noInterrupts() and interrupts() is the correct thing to do. Can anyone tell us why are they even there? The purpose of noInterrupts() is to prevent interrupt handlers from running in the middle of a critical section of code. But this makes no sense -- we are already in an interrupt handler here, where protection from other interrupts is already in effect until the function returns. At least that's the case for other Arduino microcontrollers -- admittedly, I haven't coded much for ESP32. Someone say something if I misunderstand this here. Furthermore, setting a byte size variable to a constant value like 1 isn't the sort of thing that counts as a critical section of code that would ever need noInterrupts() in the first place. I say it's safe to comment these two lines out and then I raise the question why were they ever there.
  • Unit Scale Load Cell

    skuu108 scale load cell
    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • Which camera for OCR?

    3
    1
    0 Votes
    3 Posts
    6k Views
    M
    Hey! THis thread is pretty old, but I hope my 2 cents would still be helpful. In case you're still looking for a camera for OCR, the M5Camera and UnitV are both good options, but keep in mind that OCR technology is not solely dependent on the camera. The software you use is equally important. Have you considered trying out this automatic document scanning and OCR service? It can help you recognize text, numbers, and even colors from an image. You can find more info at https://smartengines.com/. Best wishes!!
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    90 Views
    No one has replied
  • Wiring of M5Stack Mini Infrared Emitter & Receiver Unit

    2
    0 Votes
    2 Posts
    3k Views
    C
    Yes, you have to "switch" the lines between the IR Unit and the Atom : One side is Tx -> RX, the other side RX -> TX White line: IR Unit receives the signal and transmitts it(TX, marked "data" IN) ) to the Atom,. Atom is receiver (RX), (G32 as input) Yellow line: Atom is the sender (TX) (G26 as output), IR Unit receives the data (RX) (marked "data" OUT) and transmitts the signal via IR (25Hz carrier) Check if it works with a mobile phone camera ...
  • M5.BtnA.wasPressed() conflicts with WiFi?

    btna wifi
    8
    0 Votes
    8 Posts
    20k Views
    M
    The cause is the ESP32 bug. M5Stack Community : M5.BtnA.wasPressed() conflicts with WiFi https://forum.m5stack.com/topic/3262/m5-btna-waspressed-conflicts-with-wifi This is a report of measures for the A button of M5Stack and the B button of M5Stick C to operate without permission. ButtonA on M5Stack does not work properly : May 02, 2021 void setup(){ WiFi.begin(); WiFi.setSleep(false); } or #include <driver/adc.h> void setup(){ adc_power_acquire(); // ADC Power ON : blog : ButtonA on M5Stack does not work properly : May 02, 2021 https://macsbug.wordpress.com/2021/05/02/buttona-on-m5stack-does-not-work-properly/ [image: 1673986979664-p.jpg]
  • MPU-6886 Questions / Information

    4
    0 Votes
    4 Posts
    10k Views
    F
    Check out the code on my implementation on M5 Seismometer. I only worked on accelerometer, not gyro, but the calibration method is the same. You can also find the datasheet under /doc folder.
  • 6060-PUSH Feed Speed & Calibration

    6
    0 Votes
    6 Posts
    7k Views
    ajb2k3A
    @robjasey Cool, can't wait to see the finished project and please consider writing it up and posting to hackster.io which is where you can find a turntable project of mine.
  • Using M5stack IR module in UART mode

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • M5station485 factory installed program

    15
    0 Votes
    15 Posts
    15k Views
    felmueF
    Hi @Ricky_M5Station thank you for confirming the fix works. I've created a PR to fix the issue. Thanks Felix
  • What is this card you mailed me?

    6
    1
    0 Votes
    6 Posts
    8k Views
    ajb2k3A
    @wsanders They won't work with phones as phones use the NFC version of RFID which works on a different band.
  • StepMotor Driver connector 2.54 4P

    1
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Universal IOT Experiment Kit SHT30

    3
    0 Votes
    3 Posts
    4k Views
    F
    @teastain Thanks!
  • My UnitV2 camera overheats within 5 minutes. Is that normal?

    unitv2
    3
    0 Votes
    3 Posts
    7k Views
    I
    @viquaheeg520 I have a number of cameras that have caught fire whilst operating on charge. The ESP32 has cracked and literally let the smoke out. Not sure if that is related but clearly I can't risk using the 30 or so units we bought.
  • ESP32 cameras catching on fire!

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • Set as background Command through uart

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied