The brief I gave myself was a voice recorder and note taker, with an SD card or flash option, a list of saved notes with the time and date, and it had to look extremely sexy. On a Waveshare ESP32-P4 4.3-inch. Here's how it came out.
What it does
- Tap the key, say something, tap again. The note is saved as a WAV file named by the date and time.
- One list holds every note, newest first, with its date, time and length. Play, rename or delete the one you pick.
- Save to the SD card, to the board's own flash, or both. Each row says where it lives.
- A line at the top says where the next note goes and how much room is left, like "SD 14.2 GB free".
- A settings screen for card or flash, speaker volume and gain, and microphone sensitivity. Plus Wi-Fi from your phone.
It ran on my 4.3, and it's in the gallery to open and make your own.
No new widget
The interesting bit is that Voice Notes isn't a special widget. It's three ordinary things anybody can use: Record to a file (which can now name each recording by the clock), a Data list that lists a folder of recordings, and actions to play, name and delete the one chosen. So the same parts make a dictaphone, a doorbell message board, or a log of what the dog did while you were out.
An SD card you can trust
Cards get pulled out mid-write, go flaky, or turn up half asleep. So in any design that watches a card, a card only counts as in once a test file on it has been written, read back byte for byte and deleted. Until then nothing touches it. After three failed tries the design can say the card isn't working, rather than freezing. Take the card out and the list empties; put it back and it refills, with two automations you can see and change.
Microphones on the P4
This needed the P4 boards' own microphone chip running, set up the way Waveshare's own microphone sketch does it. I heard it on my 4.3. The 5-inch and 7B use the same chip and are compiled. The Audio page has the rest, and the 4.3 board page has its pins.


