🤖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?
  • M5 esp32 cam with solar charging out of the box

    4
    1 Votes
    4 Posts
    7k Views
    J
    It's built like this image. My solar panel is a 5 volt 60mA panel. The battery is a 500mA lipo battery. The output on the right (in the image the dc-dc step up, my timercam is connected) in the image connects to the onboard connector of the Timercam. I've used the original plastic shipping case to construct a waterproof case for the components. [image: TP4056-Module-Working.jpg]
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    5 Views
    No one has replied
  • Arduino IDE sample sketch "UHF-RFID-JRD4035" for Aton Lite

    3
    0 Votes
    3 Posts
    4k Views
    Bat21B
    Hello everyone Also bought Core 2 All examples do not work either. I am a little desperate. Thanks.
  • 0 Votes
    2 Posts
    5k Views
    robskiR
    @ameero95 said in M5StickC Plus cant drive an Adafruit sensor module (3.3V) through the Grove port using the Grove to STEMMA QT adapter.: STEMMA QT try level shifter maybe?
  • M5Tough upload fails, can anyone help?

    3
    0 Votes
    3 Posts
    5k Views
    G
    Thank you. I hope M5 or espressif can fix this bug soon.
  • Arduino IDE sample sketch "UHF-RFID-JRD4035" have error

    6
    0 Votes
    6 Posts
    9k Views
    Bat21B
    Hi Paopao, I am in your same situation, I have been trying to communicate UHF-RFID-UNIT with Aton Lite and I don't know the right code. Could you spend the code to start my project? Thank you
  • AtomFLY: All enabled motors spin slower as I turn on additional motors

    3
    0 Votes
    3 Posts
    5k Views
    ajb2k3A
    Have you checked the voltage drop of the batteries as each motor spins up?
  • M5Stack UnitV1

    2
    0 Votes
    2 Posts
    4k Views
    H
    The OV2660 version is EOL, but you can buy the OV7740 version here: https://shop.m5stack.com/products/unitv-k210-edge-computing-ai-camera-ov7740 (There are no noticeable differences between the 2 versions)
  • Send snapshot by Timer Camera X

    2
    0 Votes
    2 Posts
    3k Views
    I
    Yes if you google "m5stack timer camera examples" there are multiple examples .. I have tried several but so far not able to get good resolution .. i think the software is not referencing the PSRAM corrrectly because the picture save process errors at about 450k. I am going to try this tomorrow .. https://github.com/mumris/M5Stack-Timer-Camera-X
  • drawJpgFile at specific coordinates

    3
    0 Votes
    3 Posts
    10k Views
    AsmodevA
    void drawJpgFile(fs::FS &fs, const char *path, uint16_t x = 0, uint16_t y = 0, uint16_t maxWidth = 0, uint16_t maxHeight = 0, uint16_t offX = 0, uint16_t offY = 0, jpeg_div_t scale = JPEG_DIV_NONE); void drawPngFile(fs::FS &fs, const char *path, uint16_t x = 0, uint16_t y = 0, uint16_t maxWidth = 0, uint16_t maxHeight = 0, uint16_t offX = 0, uint16_t offY = 0, double scale = 1.0, uint8_t alphaThreshold = 127); As you can see you don't need the extra values because they're automatically SET, even M5.Lcd.drawJpgFile(SD, "/wifi.jpg",110,40,100,100,0,0); does not work though, Why are the libraries not working properly?
  • Timer Camera X voltage range

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • You guys put the wrong threads in M5-StickT, you put M6, not 1/4"-20

    3
    0 Votes
    3 Posts
    4k Views
    F
    And while you guys fix the nylon 3D printed case design, please also add holes for the infrared emitter. I see the IR emitter LED on the PCB but there's no holes on the case to let the light out. And if you are wondering, yes, I do need it. It would be helpful if you guys posted a file type better than STL so I can actually edit the 3D model myself. Like STEP or IGES.
  • m5Paper Screen issue

    m5paper screen
    6
    0 Votes
    6 Posts
    9k Views
    felmueF
    Hello @ebr61168 I am out of ideas at this point in time, sorry. Have you checked with M5Stack support or the shop / store you got your M5Paper from? Thanks Felix
  • Powering on the c3u

    7
    0 Votes
    7 Posts
    9k Views
    K
    Hi @felmue Ok, but thank you for loking into it anyway. Best regards Kenneth
  • M5Paper v1.1: Detect charging state and progress

    3
    0 Votes
    3 Posts
    5k Views
    H
    Hi @MauriceX111 I've also just got an M5 Paper v1.1 (my first experience of M5 or ESP32) and it is a very nice product but I'm also struggling to find out things... Very grateful that this community - and especially @felmue - are here, otherwise I'd be completely stuck! Felix pointed me at the code that the device ships with. Searching this, I found here the following code // Battery _bar->setTextDatum(CR_DATUM); _bar->pushImage(498, 8, 32, 32, ImageResource_status_bar_battery_32x32); uint32_t vol = M5.getBatteryVoltage(); if (vol < 3300) { vol = 3300; } else if (vol > 4350) { vol = 4350; } float battery = (float)(vol - 3300) / (float)(4350 - 3300); if (battery <= 0.01) { battery = 0.01; } if (battery > 1) { battery = 1; } uint8_t px = battery * 25; sprintf(buf, "%d%%", (int)(battery * 100)); // _bar->drawString(buf, 498 - 10, 27); _bar->fillRect(498 + 3, 8 + 10, px, 13, 15); So that doesn't help with finding out whether the battery is charging; but it does seem to be the best available way to represent the charge level. HTH.
  • Stamp C3 /C3U pinout diagrams

    8
    0 Votes
    8 Posts
    12k Views
    teastainT
    @felmue OK! I tied the very complicated TOF sensor because it is in-line code, no damned Library and... ...It works on C3. The expected activity on the G1, G0 was as it should be. So, thanks for your help, I will use this event as a plateau and work to trouble shoot the ENV myself, probably with in-line code, No Lib !!! Vielen Dank!
  • M5Stack Module and Sensor power specs

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • M5Stamp C3U unable to load program

    8
    0 Votes
    8 Posts
    12k Views
    T
    Thanks @felmue. When I looked at your code I realised my mistake. I'd been treating the RGB LED as a simple LED, not an RGB. I should have read the spec sheet! It's all working as expected. I have also managed to get the M5Stamp attached to Blynk. Tony
  • 0 Votes
    1 Posts
    3k Views
    No one has replied
  • LoraWAN868 demo error

    8
    0 Votes
    8 Posts
    10k Views
    T
    Hi @felmue I got a bit further. Instead of just using the demo app, I built the app up step by step from the separate unit components and put debug prints on each step. I have now got the code printing a message at the top of the loop containing the two if/do statements. So for me it seems that taking the demo code was the problem. I don't know why though as I essentially built the same code block by block. The next problem is that Things Network is not letting me in. I think I will have to switch to the arduino IDE as there is a bit more control over debugging there Tony