This hardware badge is a computer programmed with Lisp. You can write your own programs right on the badge using the built-in keyboard, as long as you know Lisp.
If there’s one thing we really like to see, it’s people advancing their own projects based on inspiration from others. The Lisp Badge by [David Johnson-Davies] is a perfect example. With an interface inspired by [Voja Antonic’s] hardware design for the 2018 Hackaday Belgrade Conference Badge, this version is an upgrade of an earlier single-board Lisp machine, now sporting an integrated keyboard.
Unlike the Belgrade badge, which is programmed in BASIC, this new badge is programmed in uLisp, a subset of common lisp designed for microcontrollers. Let’s face it, BASIC is retro, but Lisp is even more so, only pre-dated by FORTRAN as the oldest high-level language. So, if you’re into retro-style programming on small devices (physically small, that is), you should consider building one of these.
A 16 MHz ATmega 1284P serves as the badge’s brain, allowing storage for 2,816 Lisp cells, while the 256×64 pixel OLED display shows 8 lines of 42 characters in 16 gray levels. A full complement of I/O connections includes four analog inputs, two analog outputs, I2C, SPI, serial, and a handful of GPIOs for interfacing with just about anything. Power comes from a LiPO battery, which at a nominal voltage of 3.7 V doesn’t quite meet the datasheet requirements for running the processor at 16 MHz, although it seems to work fine in practice. Really cautious builders could opt for a 12 MHz crystal transplant to avoid any possibility of problems.
The keyboard layout is optimized for uLisp programming: unnecessary keys have been removed and the all-important parenthesis are afforded their own dedicated keys on the bottom row. This is presumably for convenience of use, but we suspect this will also make it easier to replace the parenthesis key switches when they inevitably wear out from overuse [obligatory Lisp/parenthesis joke].
As far as entering uLisp programs, you can simply use the keyboard. The built-in editor buffers a full screen of text, and includes parenthesis matching that highlights each pair as you type. We’re guessing that we won’t see Emacs implemented in the near future, so this bracket management is a great feature for a badge-based editor. If you find the keyboard difficult to type on, you can also enter programs over the serial port.
The other thing we really like to see is open-source projects. [David] doesn’t let us down on this point, either. The Eagle design files for the PCB as well as the source code for the badge are available on GitHub. The PCB is also shared on OSH Park, and there are detailed instructions for installing the bootloader and uploading the code.
If programmable badges is your thing, also check out the 2018 Hackaday Supercon Badge, the successor the Belgrade design.
Thanks to [Sven] for the tip!
Very nice. Very, very nice. I miss having a Symbolics machine on the desk.
Amazing how this old language keeps popping up. I dare anyone to make a SNOBOL badge.
It keeps popping up because C is such an awful language, and people are looking for something better. C is really nothing more than a thin layer over PDP-11 machine language with a badly implemented macro processor glued on. The poor behavior of C arithmetic makes it impossible to write secure code. Its explicit low-level nature seems useful, but it also makes many compiler optimization difficult or impossible. C++ inherits all of this nonsense and is no better. If you want a language with well behaved arithmetic and a proper macro processor then Lisp is a good place to start.
> C is really nothing more than a thin layer over PDP-11 machine language with a badly implemented macro processor glued on.
Exactly this is why I love C! C is my favourite macro assembler… so to say. I really don’t have the time to do assembler on all the platforms that cross my way.
C is the best.
Just recompile on any platform.
The thin layer is just a common language independent of the CPU.
In which way is it awful exactly? Could you elaborate on this one please? And what’s that wrong with arithmetic? All i could think of are just the undetected type overflows…
check Ruby. ruby is great
but need 400Kb RAM
It does seem like, of all the languages to add object-orientation and whatever else to, C was the worst possible choice. Except maybe Objective Assembler, which hopefully doesn’t exist. Objective Brainfuck maybe. Any idea why Bjarne chose C to add pluses to, or was it just cos he thought it was funniest?
C is acceptable because many programs have only a tiny fraction of performance critical code, and the rest is all low speed UI stuff. It still sucks to write any C at all, but I don’t see why anyone would want to write a complete application in anything remotely low level when python makes calling C so easy.
Recently my language of choice on embedded systems has been Squirrel, but it really needs ESP32 or better MCUs to work on, so I’m stuck with CPP for everything else.
I’ve always wondered why there aren’t more compilers targeting LISP source code. The syntax is confusing for most, but the interpreters are fantastically compact and easy to write.
Could be worse. Could be COBOL. ;-)
I just have to make one of these! The power of 6.001 compels me!
I would be curious if anyone out there has any wisdom about those key switches, if anyone has found ones that work better, or last longer, or are easier on the fingers, or such.
You could use the keys I designed for the Hackaday Superconference 2018 Badge in a new enclosure:
https://hackaday.io/project/162134-hackaday-superconference-2018-badge-enclosure
Wonderfull ! Great.
I need usb for ethernet and normal keyboard
and meybe sfe GPIO not in hand place
one question, is possible put a FPGA and Atmega processor?
Atmega for system, screen etc, and fpga for main program … and meybe usb?
FPGA is not a CPU.
Use the FPGA for the system.
FPGA can implement almost any logic device, including CPU.
In a small project, if you use an FPGA, you probably do not need anything else. Except for a bigger battery.
Looking at all those switches makes me feel sorry for anyone typing any program on it.
Anyone up to argue whether this is bare metal or not, or which of the two is the barest of metal? Referring to the recently featured https://hackaday.com/2018/12/19/thats-a-lisp-machine-in-your-pocket/
I’m just glad it has an Atmega processor instead of a PIC.
If you’re wondering what the Lisp code does, it’s a function for the Hofstadter Q-sequence https://oeis.org/A005185
1, 1, 2, 3, 3, 4, 5, 5, 6, 6, 6, 8, 8, 8, 10, 9, 10, 11, 11, 12 …
Has anyone come up with a mesh routing for one of these badges? With lots of these floating about routing full time connecting devices point to point should be very easy and requite no other infrastructure. Think voice, swapping images, code, contact cards, messages etc … could use FireChat application on phones as a start. An interesting point of optimisation would be to use controllable rf power so that the more nodes there are in theory the closer the proximity of nodes the less rf is needed. In a dense mesh as at a con micro miniature power levels should mean tiny power draws. So no 3/4G or wifi internet infrastructure would be needed as such. Why a badge? Because phones cant be running the routing layer application in the background full time. I would love to see such anarchy work and spread out.