{"slug": "floppy-led", "title": "Floppy LED", "summary": "Ben Nuttall, a developer, built a Raspberry Pi project that uses colored floppy disks to trigger matching LEDs via a USB floppy drive, after initially failing to get udev events working during the first COVID lockdown. The project, detailed on GitHub at github.com/bennuttall/floppy-led, uses a udev monitor in Python and gpiozero to read a text file from the disk and light the corresponding LED, with Claude AI helping to solve the media-change detection issue via udisks2 polling.", "body_md": "# Floppy LED\n\nDuring the first COVID lockdown, stuck at home, bored, I had a silly idea: could I use the insertion of a floppy disk as a trigger to control something from a Raspberry Pi? I bought a sleek USB floppy drive and a brand new 10-pack of disks.\n\nAlthough I managed to mount the floppy and read files from it, I struggled to get udev events working and quite quickly gave up. The floppy drive and disks have lived in a drawer ever since, but my intention to one day make this silly dream a reality never wavered.\n\nSome six years later, with a Raspberry Pi and a HAT out on the desk fresh from some gpiozero hacking\n(see [last week's post](/blog/2026/07/gpiozero-flow/)), I decided it was time to try something\nwhacky with floppy disks. And I had no excuse this time, because I had [Claude](https://claude.ai/)\non hand to help if I hit any blockers.\n\nThis is what I came up with:\n\nSince I had a HAT with traffic lights on it, I thought it would be fun to have differently coloured floppy disks light up a matching LED - so I wrote a file containing \"red\", \"yellow\" or \"green\" to each of three disks, and labelled them with a coloured sticker to match.\n\nA udev monitor in Python detects the floppy drive event, reads the text file to determine the colour, and (using gpiozero, obviously) lights up the appropriate LED.\n\nClaude figured out the part I'd got stuck on last time:\n\nNo native media-change signalling. USB floppy bridges don't tell Linux when a disk is swapped, so detection relies on udisks2's periodic polling of removable drives (it re-probes every couple of seconds and fires a fresh change uevent when the state changes).\n\nSee the instructions and code on GitHub:\n[github.com/bennuttall/floppy-led](https://github.com/bennuttall/floppy-led)", "url": "https://wpnews.pro/news/floppy-led", "canonical_source": "https://bennuttall.com/blog/2026/08/floppy-led/", "published_at": "2026-08-08 12:35:24+00:00", "updated_at": "2026-08-09 12:52:33.520832+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools"], "entities": ["Ben Nuttall", "Raspberry Pi", "Claude", "GitHub", "gpiozero", "udisks2"], "alternates": {"html": "https://wpnews.pro/news/floppy-led", "markdown": "https://wpnews.pro/news/floppy-led.md", "text": "https://wpnews.pro/news/floppy-led.txt", "jsonld": "https://wpnews.pro/news/floppy-led.jsonld"}}