You are browsing as a guest. Sign up (or log in) to start making projects!

Open comments for this post

9h 52m 59s logged

Hi everyone, basically what is that project: It is a offline music player. The Stack is: A esp32 stream via bluetooth classic A2DP audio MP3 from a SD card to a bluetooth device.Ik there is a lot of devices that do the same, but isnt more funny build it instead of just buying?Why i made It? Because i wanted to listen music while i was at school, but i had a problem: my school doesnt allow smartphones / eletronics, so i couldnt just bring a MP3 player and listen. I remember exactly How i was in that moment, i was in a art class very very bored, so i thought: Why not just create one player all by myself? So i made It.I do not know much about C/C++ to build one all by myself, so i used codex and claude code to develop the Code while i was analising outputs and thinking things that If i tried send to a AI my credits would be gone.I had a Lot of problems while developing, even using AI, maybe because i a free tier at them. Some of the problems:For some reason the music was Very Very Very laggy, and none AI could help me with that, i was trying different methods to solve it (without AI for a period bc i ran out of credits) until i realised that it wasnt working, so i stopped and thinked: What make the music being laggy? I noticed that there was 2 problems going: the music was with some delays at each stream and it was cutting.Afther a while i asked AI about it and realised that the cutting was about RAM, so i asked AI to add a Idea: Create read zones, where each zone reads a different amount of data from the sdcard, and when it is near the max it stops for a while. It solved the cutting problem (that was Just some data from the music being lost bc it was reading more than it could store in memory) (i was thinking that the music was corrupted bc it was distorced, i checked the way that the Code was converting the MP3 into bytes for like 3 hours).But i still was having the delay problem: At first i thought it was bc of some delay, but wasnt… So i thought “what makes a chip slow?”, then I reached at clock speed. I changed from 40MHZ to 240MHZ, that solved the problem.
I also had a problem with the bluetooth connection, it Just wasnt connecting and i nearly quit the project. The problem was Just the way it was connecting and responding the data sent from the bt device.

That project taught me a Lot about computers, even with me just thinking and not programming. It taught me about RAM, clock speed, different kinds of connection, optimization, various ways of storing a music, how to make a good prompt, what is the difference between analogic and digital signals, and something that i even used in a essay: how to belance consume, limit, speed and production rate. That can be used in various cases, in the project was about How many the bt device consumes, how fast the ESP should decode the data, How fast it should reais from the sdcard and How many resources (ram) i should allocate based on the others.

0
0
5

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…