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

8h 38m 11s logged

Devlog №5

I added sound effects for every button press on my mini-console! Sounds like a super quick and easy task, right? Well, it should have been. But a few architectural bumps in the road ended up eating way more time than expected.


What went wrong (and how I fixed it)

  1. Hardware Pin Conflict:

    My buzzer was originally soldered to a pin used by SPI. As soon as the display initialized, things went sideways.

  2. Game Loop vs. Main Loop Architecture:

    My game logic was running inside an infinite loop within a standalone function, while the sound playback logic lived in the main loop calling that function.

Solution: soldered the buzzer to another pin and quick architecture refactor solved both problems pretty easily — I spent about an hour on each issue.


The Biggest Problem: A very loud buzzer remains the biggest and unsolved issue.

I tried to tame it in software using PWM (Pulse Width Modulation) to decrease the volume. But PWM control is tricky on its own, and since the buzzer relies on a fixed frequency to generate tone, layering custom PWM over it completely broke the audio pitch.


Next Up:

  • Implement smooth scrolling text for the console startup screen.
  • Conquer this cursed PWM/volume issue once and for all.
  • Start writing a Flappy Bird clone
0
8

Comments 0

No comments yet. Be the first!