Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. swiminthesky
    S
    • Continue chat with swiminthesky
    • Start new chat with swiminthesky
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups
    Save
    Saving

    swiminthesky

    @swiminthesky

    0
    Reputation
    11
    Posts
    407
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    swiminthesky Follow

    Posts made by swiminthesky

    • RE: M5Core2 + Bottom2 Example crashes

      Hm.. thanks @felmue but I doubt that it is the library. Both LED library examples work fine.

      Also

      void microPhoneInit()
      {
          InitI2SSpakerOrMic(MODE_MIC);
          
          // <------------
          xTaskCreatePinnedToCore(i2sMicroFFTtask, "microPhoneTask", 4096, NULL, 3, NULL, 0);
          // <-----------
      
      }
      

      The crashes stop when I exclude this line. Also the LEDs work fine then.

      The mic/fft also does not show any minimal sign of signal, also within the 5 seconds before reboot. Maybe the Mic of the Bottom2 is broken? Is there a simple way to check if it is alive?

      -- Edit: I updated all libraries. After bit more testing, the line seems to be pretty robust when it comes to the crash. But I also tried to adapt this M5Stick microphone example (M5Core2.h instead of M5Stick.h, the pins ought to be the same) but without success and it leads to a similar line xTaskCreate(mic_record_task, "mic_record_task", 2048, NULL, 1, NULL);

      Btw. my Core2s are not flashed to have a lot of memory and maybe the queues are reaching the heap (as f.i. mentioned here). I used uxHighWaterMark = uxTaskGetStackHighWaterMark( NULL ); and I get number of 6100.

      ---Edit2: I tried this recording example, which is not parallelized by xTaskCreate, and it does not crash. Unfortunately I don't see any results after pressing 'record', it only starts to vibrate after 1-2 sec. and my other Core2 also makes a slight click&rumble sound. Shall I use VSCode+PlatformIO to debug?

      --Edit3: I tried to patch tha partition / psram via this guide, I am not totally sure if it worked. And the record.ino. It doesn't crash, but the mic also only does the click/rumble after pressing record for 1.5s as before. Very strange..

      posted in Core 2
      S
      swiminthesky
    • M5Core2 + Bottom2 Example crashes

      Hello, I am using the Example for Bottom2 with my Core2:

      https://github.com/m5stack/M5-ProductExampleCodes/blob/master/Base/M5GO_BOTTOM2/M5GO_BOTTOM2.ino

      But the Core2 crashes and restarts all 5 seconds. I would assume there is a bug with the Microphone initialization?! (Also the Speaker example is also missing in the code)

      posted in Core 2
      S
      swiminthesky
    • RE: UnitCam quality and compression settings missing for Arduino and Core2

      Thanks lot @felmue, I really appreciate.

      I had guessed the output format can also simply be changed by writing to the ov2640 register. At least it says it on the main page, that the other settings would be available.

      Anyways, I am fine with working with jpg, but unfortunately I cannot reproduce the jpeg yet in an RGBA8 texture with the given resolution from the provided buffer (~8000 bytes). The photo taken is just white/grey.

      0_1667220298210_8224550e-e22d-41b3-90ed-9e59588730eb-grafik.png

      0_1667220428253_0cf88125-bb78-4c0a-9827-97a54f63315b-grafik.png

      I am just sending the uint8_t buffer over Serial
      for (uint32_t i = 0; i<frame.size; i++) { Serial.write( frame.buf[i] ); }, and read the bytes to a texture, while filtering for Jpeg Start ff d8 and Stops ff d9 (which I find).
      0_1667220924758_ee39c219-d6c9-44ee-8297-692ab61868f1-grafik.png

      The length / size of the buffer ~1000-3000 for the 160x140 resolution, seems suspiciously low though, compared to the relatively good image shown on the Core2 display. Hm.. I assume the buffer has to be uncompressed based on compression settings found in the Jpeg header bytes..

      -- Got it working by decompressing jpeg

      posted in Units
      S
      swiminthesky
    • RE: UnitCam quality and compression settings missing for Arduino and Core2

      Also I can't find out the default resolution of the camera :/

      I just found the device control register list for the ov2640. But I have to figure out how to write to the registers via Core2/ESP32

      0_1667169748991_ecc89c74-87c1-43b9-a04d-802becf19061-grafik.png
      0_1667168805826_68f6083f-56cc-41ac-9ae0-5ab50f112030-grafik.png

      The older esp_camera.h is getting camera addresses and configs from sensor.h (OV2640 is on 0x26 there)

      posted in Units
      S
      swiminthesky
    • UnitCam quality and compression settings missing for Arduino and Core2

      Unfortunately I didn't find any possibility to change the resolution of the UnitCam (in the official example for the Core2). I need RGB instead of Jpeg encoding, as stated in the docs.

      I would like to adapt the esp_camera.h from older camera libraries but it is completely different to the current example, though the hardware seems to be the same.

      Hopefully someone can help..

      posted in Units
      S
      swiminthesky
    • RE: Simple question regarding multiple Serial connections on Core2 (UART + USB)

      I think it works. I am just using
      Serial2.begin(1500000); for the camera and Serial seems to be free.

      posted in Core 2
      S
      swiminthesky
    • RE: Simple question regarding multiple Serial connections on Core2 (UART + USB)

      I found this info on Serials on stackoverflow

      The only serial port connected to the USB that the serial monitor can read from is Serial.
      Serial1, Serial2, and Serial3 are all logic level serial and will not show up on the Arduino serial monitor.
      If you want to see the output from these on your computer, it will require extra hardware.

      I maybe will try to route the UnitCam UART to Serial1 or 2

      posted in Core 2
      S
      swiminthesky
    • Simple question regarding multiple Serial connections on Core2 (UART + USB)

      Hi dear everyone,

      I simply want to send an image from UnitCam + Core2/Bottom2 to the computer.
      I am using the cam2core example. The cameras UART connection is bound to the original serial port! I tried Serial1 and Serial2 but without success. I didn't find any resources on Serial1 and Serial2, so maybe it is not possible to route the two Serial connections at the same time? Maybe I could use sth. like the 'Soft-Serial' Library?

      Best

      posted in Core 2
      S
      swiminthesky
    • RE: PortA i2c unit not recognized in Core2 when stacked onto Servo2?

      Yes, it seems to be a hardware problem! I switched the Servo2 module and everything works perfectly and the i2c connections over port A runs without any interruptions. Thanks Felix @felmue and sorry for bothering!

      posted in Modules
      S
      swiminthesky
    • RE: PortA i2c unit not recognized in Core2 when stacked onto Servo2?

      Thanks Felix @felmue,

      external power is used. Servo2 example (on Wire1.begin(21, 22);) also works like a charm.

      I used both these M5 i2c scanners I2CScanInternalAndAllPorts and I2C_Tester, but no I2C devices are found.

      But after removing Servo2 the device is instantly found correctly!

      (Also: I used PaHub on PortA inbetween and Extio2 is also instantly found when Servo2 is not stacked)

      0_1666436715971_WIN_20221022_12_27_01_Pro.jpg
      (ext power is not used for the picture, the Bottom2 also didn't make a difference afaik)

      posted in Modules
      S
      swiminthesky