4 ms·
> I decided to write a script that would repeatedly flash the LED on the Pi in morse code corresponding to its current IP address I wish my day job was this ex
by lwb 7y ago
> I decided to write a script that would repeatedly flash the LED on the Pi in morse code corresponding to its current IP address
I wish my day job was this exciting!
- mikece 7y agoAnd are you reading that visually in Morse code? I would have thought a different/more optimized flashing pattern that required a smartphone to read would be faster, especially if we're talking IPv6 addresses, but that's just me.
- Arnavion 7y agoYes. I made it flash 100ms-on-900ms-off for a ZERO, and 500ms-on-500ms-off for a ONE. There's a 1000ms-on-1000ms-off flash at the beginning to indicate the start point. And it's IPv4, so there's only 32 bits. So it's slow enough to read out and type out into a text editor, then convert the typeout to its IP, but not slow enough that it's a bother.
- thedanbob 7y agoThat was the part that really jumped out at me as well. I've had the same problem before and this is a genius solution.
- agapon 7y agoI feel compelled to point out that FreeBSD manual page for the led driver has this example: /usr/bin/morse -l "Soekris rocks" > /dev/led/error Guess what it does :-)
- throw0101a 7y agoFor those curious: * https://www.freebsd.org/cgi/man.cgi?query=led&sektion=4 https://www.freebsd.org/cgi/man.cgi?query=led&sektion=4 * https://www.freebsd.org/cgi/man.cgi?query=morse&sektion=6 https://www.freebsd.org/cgi/man.cgi?query=morse&sektion=6