The Microprocessor course at Shahid Beheshti ends where hardware gets honest: make a real algorithm run on a tiny chip. The task I picked — detect the pitch of a live human voice on an Arduino UNO.
How it works
- Audio is sampled in real time, and auto-correlation finds the period the voice repeats at — the fundamental frequency
- Written in C against the UNO's constraints: an 8-bit AVR at 16 MHz, two kilobytes of RAM, no floating-point unit — and a sampling loop that has to hold its timing while the maths runs
That is the whole charm of it: a signal-processing textbook page, made to fit in two kilobytes.