March 4, 2026

Shave and a Haircut… and a flame war

Raspberry Pi Pico as AM Radio Transmitter

Tiny Pi blasts old-timey radio tune—commenters argue: genius or just noise

TLDR: A Raspberry Pi Pico made an AM radio play “Shave and a Haircut” by rapidly turning a signal on and off. Commenters argue whether that counts as real AM, warn about interference and legality, and note the tiny wire keeps power ultra-low—sparking a fun history-meets-safety debate.

A tinkerer got a Raspberry Pi Pico—a tiny $4 microcontroller—to make a local AM radio hum the classic “Shave and a Haircut”. The trick: flipping a pin on and off fast enough to ride the radio waves, like old-school on–off keying instead of full-blown amplitude modulation. Cue the comment section meltdown. The top gotcha take: hulitu snaps, “receiving it on AM doesn’t mean it’s actually AM,” kicking off a semantic brawl worthy of a philosophy class. Safety cops arrive fast: lormayna warns about filters or you’ll “pollute” neighboring stations, while radio rebels joke this is pirate radio with training wheels. Tech historians beam: bitwize drops a nostalgic flex about the Altair 8800 days, when folks made computers sing through radio interference, proving this hack is part of a proud tradition of chaos. Meanwhile, mk_stjames calms the room: the “antenna” (a tiny wire) is so short compared to AM wavelengths that the power is probably nanowatts—more whisper than broadcast. Others wonder why pulse-width tricks wouldn’t work, and memes fly: “Not FM, not AM—I AM confusion.” Love it or hate it, the Pico just reminded everyone that radio is weird, rules are real, and hacks are fun. For the curious, here’s the Pico itself: Raspberry Pi Pico

Key Points

  • The article demonstrates using a Raspberry Pi Pico’s PIO to generate a ~1000 kHz square-wave carrier and transmit tones receivable on an AM radio.
  • Earlier Raspberry Pi FM hacks used a GPIO pin clocked around 100 MHz to create low-power FM signals with harmonics; the Pico cannot cleanly replicate FM due to frequency control limits.
  • Square waves are unsuitable for amplitude modulation of arbitrary audio, limiting the approach to a 1-bit envelope and preventing full .wav playback.
  • The solution uses on-off keying (OOK): the PIO outputs a continuous 1000 kHz carrier, and the main program toggles it at audio frequencies (e.g., 440 Hz) to produce tones.
  • The author, aided by LLMs, implemented code that plays the “Shave and a Haircut” melody in a loop on a basic AM radio receiver.

Hottest takes

"The fact that you are receiving it with an AM radio, doesn't mean that you are transmitting AM." — hulitu
"Please use an appropriate filter for the band that you are transmitting, otherwise you will pollute all the near frequencies with spurious." — lormayna
"I want to point out that what keeps this 'OK' is that the little wire is so 'electrically short' compared to the actual wavelength at 1000khz (a real quarter wave antenna at that freq is like 75 meters)... and thus this limits the power of this 'transmitter' to probably nanowatts." — mk_stjames
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.