Raspberry Pi Pico 2W with DFPlayerMini MP3 Player and web server

Опубликовано: 12 Январь 2025
на канале: Penguin Tutor
509
11

In my earlier video I explained about how I’ve created a micropython library allowing me to control a DFPlayer Mini MP3 player with a Raspberry Pi.

For more details see: https://www.penguintutor.com/projects...

In this update I’ve made some changes to the library, tested it with a Raspberry Pi Pico 2W and created a demonstration program showing how you can use the Pico 2W as a web server to control the MP3 player.

If you’ve missed the announcement Raspberry Pi have released a new microcontroller board the Raspberry Pi Pico 2W.

It’s based around the RP2350 microcontroller used in the Pico 2, but adds Wireless networking. So you get the performance benefits of the Pico 2, along with the optional RISC 5 instruction set and the extra security, also with the benefits of being able to connect to a WiFi network and Bluetooth version 5.2.

It’s slightly more expensive than the earlier models, but only about an extra 10% on top of the Pico W and cheaper than some other microcontrollers.

With this project you should be able to use the Pico W as I’m not really making use of the new features of the Pico 2.

One thing that the code does provide is that some of the images are created dynamically by manipulating the SVG file.

So if you look at this screenshot you will see that I’ve labelled the first two tracks as voice tracks, the 3rd as music and the 4th doesn’t have any title at all. These are all generated on the web server itself and included within the image. There are other ways of achieving this using CSS etc. but doing it this way I didn’t need to worry about what fonts are available to the web browser, or if the browser would resize the text differently.

There are some disadvantages to this as well and I’ll perhaps look at that in more detail in a future video, but I thought it would be interesting to try as a proof of concept if nothing else.

Chapters:
00:00 Video introduction
01:05 Introduction to DFPlayerMini MP3 player
02:25 Raspberry Pi Pico 2W
04:01 Web server on Pico 2W
04:38 Dynamic SVG images
05:25 Demo of mp3 player