🤖Have you ever tried Chat.M5Stack.com before asking??😎

Subcategories

  • 549 Topics
    2k Posts
    T
    Hi, this would do the work https://github.com/ThatsLucas/M5Unit-ACMeasure-Internal-FW You need to reflash it though
  • 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...
  • 504 Topics
    2k Posts
    C
    In case anyone else comes across this post, it appears that the wires coming out of the DinMeter PortB are reversed to the label, at least on my unit. G1 is the yellow wire, and G2 is the white one. It works as expected to do a digital read on the pins for a button push.
  • 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.

    257 Topics
    845 Posts
    kurikoK
    @wwhite https://docs.m5stack.com/en/guide/realtime/openai/atomic_echo_base
  • Re: [Blue Lorawan Module](/topic/443/blue-lorawan-module)

    1
    0 Votes
    1 Posts
    5k Views
    No one has replied
  • makey

    2
    0 Votes
    2 Posts
    5k Views
    ajb2k3A
    @jpilarski said in makey: I am having some difficulty understanding the makey unit. I can make it beep if I put one end of a wire in the LED pin and touch other end of the wire to various pins. I get some sounds playing through the m5stack speaker and some on the makey's buzzer. Why are there multiple pins with the same number. Should I be able to just touch the pins with my hand and register a touch. Also can you explain how to use this device in UIFLOW. Again I can get a few beeps from the makey using UIFLOW but I'm not sure I understand the pins to use or how to work with the makey blocks. It did make some great beeps and I am excited to use. Last question is does the firmware on the mega328 ever need to be updated. thanks This is the biggest issue that takes getting used to when moving from Atmega to esp32. The Atmega's pins are "Set function" in arduino however the esp32 using a mux controller to control the pins resaulting in a matrix of multi function I/O pins that need to have functions set in code.
  • comments on uiflow and m5go

    14
    0 Votes
    14 Posts
    27k Views
    J
    I would like to request that color is defined in the blocks in a way that allows the user to select one of 2 color block options you can add color by using a general color swatch selector like you have currently on most blocks you can add an RGB block that allows color to be treated as variables. [image: 1544679960772-color-resized.png] I feel like these two color options should be broken out as two color blocks that can be added onto the blocks as needed. Currently you have color broken out as three variables in some of the ui blocks but in none of the graphics blocks and this is limiting. What I am suggesting is all tools requiring color require the user to add on a color block and the color block can be one of these two types (color swatch, or RGB variables). I think this can help make the interface cleaner since you don't have to have all these redundant blocks but rather a single block with the option to select how color is to be defined. This gives the user way more programming options since they can opt to use a swatch when needed or to use RGB number values or variables if needed. Also I think you need a list block to define the length of an array. It would also be great to have a block for list pop.
  • M5Stack incompatable with Arduino 1.8.8.Release

    8
    0 Votes
    8 Posts
    10k Views
    ajb2k3A
    I'm getting so far and then I hit the "Invalid conversion" error and get stuck as I dont understand the issue.
  • Arducam (arduino) Can't find OV2640 module!

    6
    0 Votes
    6 Posts
    10k Views
    ajb2k3A
    @watson 在 Arducam (arduino) Can't find OV2640 module! 中说: @ajb2k3 Here's the pinmap about camera supplied by m5stack. https://github.com/m5stack/M5-Schematic/blob/master/Units/m5camera/hardware_diff_with_ESP32CAM_M5Camera.md That doesn't tie up because the arducams arduino_pin.h has D2 as I/O12 and slave select as I/O17
  • 0 Votes
    2 Posts
    5k Views
    m5-docsM
    @vidarr Hello, vidarr Here's pinmap [image: 1544149228717-sim800-resized.jpg] https://m5stack.github.io/m5-docs/#/en/product_documents/modules/module_sim800
  • preferences.h lib error in core

    3
    0 Votes
    3 Posts
    7k Views
    yelloweliseY
    @rop my problem is with black...
  • Where is the Black Friday sale on the Fire???

    3
    0 Votes
    3 Posts
    8k Views
    world101W
    @teresa Ordered one. Thanks! 😀
  • Ideas, helping M5Stack document stuff...

    29
    1 Votes
    29 Posts
    128k Views
    KabronK
    @watson 在 Ideas, helping M5Stack document stuff... 中说: Please read this doc. I updated it just now. It is better to see once than read 100 times bla-bla-bla
  • Write Text to the Display 90° rotated ?

    2
    0 Votes
    2 Posts
    7k Views
    RopR
    Not with the Adafruit-GFX library that is the display driver in the M5Stack library. You can rotate the display, but only the whole display, not show text in multiple orientations at the same time. It would be a cool modification though...
  • Warranty question M5stack is dead

    15
    0 Votes
    15 Posts
    31k Views
    KabronK
    Do I descripte your phenomenon correctly? Absolutelly correct. I have to mark socket sides of all my cables
  • A few questions about the stepper motor model.

    5
    0 Votes
    5 Posts
    8k Views
    ajb2k3A
    @watson 在 A few questions about the stepper motor model. 中说: @ajb2k3 A1 here is the document and picture about stepmotor module https://m5stack.github.io/m5-docs/#/en/product_documents/modules/module_stepmotor [image: 1542613791592-tim%E6%88%AA%E5%9B%BE20181119154821.png] A2 Yes, soldered to PCB Thanks, I wondered why I could not move them or find the atmega. Thank you.
  • [Ignore] GRBL Module messages.

    3
    0 Votes
    3 Posts
    5k Views
    ajb2k3A
    @watson Sorry, the M5Stepper module. but solved this question just struggling with the OSD side of the issue.
  • How to use SPI with the stack ??

    5
    0 Votes
    5 Posts
    15k Views
    M
    Hi Rob. Yes there are 100nF directly at the Power supply of the Mcp3204. But that won't help. I Ordered some lm4040 to have a clean voltage reference. I think that will help. Regards Dominik
  • M5Stack SERVO Module 12 Ch - change I2C address

    3
    0 Votes
    3 Posts
    7k Views
    MrTarantlM
    That sounds perfect - yes i have an usb isp :D Just a sneak preview of the animatronic robot (this is a "just for fun" project ...) [image: robot.jpg] Thanks Chris
  • MicroPython lcd.qrcode is not work

    3
    0 Votes
    3 Posts
    9k Views
    K
    @lukasmaximus 在 MicroPython lcd.qrcode is not work 中说: uiflow Thank you for your reply! By your explanation, I understand that there is a difference between the two services. I was thinking of using M5 Cloud Offline to use M5 Stack offline. I usually use Python, so I wanted to use microPython. However, given the richness of the library, I felt it should be implemented with cpp. In the future, if microPython 's functions are enhanced, I would like to try again.
  • Replacement black rubber feed pads?

    2
    0 Votes
    2 Posts
    5k Views
    TeresaT
    Hi My Friend, You mean the rubber pad as below photo ? But sending these only may needs a high shipping fee. If you have any plan to make a new order our AliExpress store, can leave us a message. I'll send you some for free together. [image: 1542002529495-eg.png]
  • Nema17 to Grove adapter.

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • Display mirror data sent over serial terminal.

    6
    0 Votes
    6 Posts
    8k Views
    ajb2k3A
    @rop 在 My current issue is that because there is no serial.print(); I cant issue m5.lcd.print(); or ez.canvas.print(); I'm seriously confused with this code.
  • X-Code on OSX intergration.

    3
    0 Votes
    3 Posts
    6k Views
    ajb2k3A
    @loboris 在 X-Code on OSX intergration. 中说: esp-idf has been available under OSX from the beginning. Standard Setup of Toolchain for Mac OS Yes I know that but there is no intergration with osx'x native x-code ide.