🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    MP3 player

    PROJECTS
    2
    4
    16.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      Kryten
      last edited by

      Is it possible to make the M5 work as a MP3 player?

      I mean read from a MP3 file on SD card and output via the speaker?

      My son have a project via school and he wants to build a robot that asks 'how was your day'.

      I thought about putting it as a mp3 (or any audio file) and play back when some one moves close enough (using Ultra sound distance meter) adding some servos to move the head and eyebrows. adding some neopixels as eyes as well

      1 Reply Last reply Reply Quote 1
      • D
        DoNcK
        last edited by

        MP3 doesnt seem supported by the M5Stack library, however the Speaker class has 8bit PCM support:
        void playMusic(const uint8_t* music_data, uint16_t sample_rate);

        Still you would have to bind it to the SDcard files, by now the audio is defined in startup_music.c as: const unsigned char m5stack_startup_music[]

        Also, this could help you:
        https://github.com/MrBuddyCasino/ESP32_MP3_Decoder

        1 Reply Last reply Reply Quote 0
        • K
          Kryten
          last edited by

          @DoNcK Thansk I will look in to this.

          1 Reply Last reply Reply Quote 0
          • D
            DoNcK
            last edited by

            Another one wich looks even more promising :
            https://github.com/earlephilhower/ESP8266Audio

            1 Reply Last reply Reply Quote 0
            • First post
              Last post