A common complaint among laptop users is that while battery technology has vastly improved over the past decades, a simulltaneous shrink in form factors has meant that a typical laptop today doesn’t last much longer on a battery charge than one from the early 2000s. But it doesn’t have to be that way, as [Andreas Eriksen] demonstrates with his entry for the Low Power Challenge. The PotatoP is a portable computer that should be able to run for about two years on a single battery charge, and can be topped up through an integrated solar panel.
Granted, it doesn’t have the processing power of even the cheapest laptop you can buy today, but it’s perfectly fine for [Andreas]’s use case. He’s a Lisp hacker, and a Sparkfun RedBoard Artemis can run uLisp just fine on its 48 MHz Cortex-M4F processor. The operating environment is very basic though, even requiring [Andreas] to write his own text editor, called Typo, to give him editing luxuries like backspace functionality and a movable cursor.
The Artemis board is very power-efficient by itself – typical power consumption is less than 1 mA. [Andreas] added a simple monochrome black-and-white LCD screen capable of displaying 53 columns of text, plus an SD card reader for data storage, and designed a sleek 3D-printed case to hold everything together. When running a typical piece of code, the entire system uses around 2.5 mA, which translates to about 125 days of continuous run-time on the beefy 12000 mAh lithium battery. Add a bit of solar power, plus a more realistic eight-hour working day, and the two year runtime estimated by [Andreas] appears entirely reasonable.
This has to be one of the most power-efficient portables we’ve ever seen, and one running Lisp at that. Despite its age, Lisp keeps popping up in interesting custom computers like the Lisperati1000 cyberdeck and The Lisp Badge.
Continue reading “Low Power Challenge: The PotatoP Runs Lisp For Months Without Recharging” →
As a programming language, Lisp has been around longer than any other active language except for Fortran. To anyone who regularly uses it, it’s easy to see why: the language allows for new syntax and macros to be created fluidly, which makes it easy to adapt it to new situations, like running it on a modern Atmel microcontroller to control the LEDs on this star pendant.
The pendant has simple enough hardware — six LEDs arranged around the points of the star, all being driven by a small ATtiny3227 operating from a coin cell battery. This isn’t especially spectacular on it’s own, but this particular microcontroller is running an integer version of a custom-built Lisp interpreter called uLisp. The project’s creator did this simply because of the whimsy involved in running a high-level programming language on one of the smallest microcontrollers around that would actually support the limited functionality of this version of Lisp. This implementation does stretch the memory and processing capabilities of the microcontroller quite a bit, but with some concessions, it’s able to run everything without issue.
As far as this project goes, it’s impressive if for nothing other than the ‘I climbed the mountain because it was there’ attitude. We appreciate all kinds of projects in that same vein, like this Arduino competitor which supports a programming language with only eight commands, or this drone which can carry a human.
There are two kinds of programmers: those who don’t use Lisp, and those who need new parenthesis keycaps every six months. Lisp is one of those languages you either really love or really hate. If you love it, you may have checked out ulisp, which runs on Arduino boards of the AVR and ARM variety, as well as ESP chips, RISC-V, and others. A recent update allows the language to insert assembler into AVR programs.
We probably don’t need to convince anyone reading Hackaday why adding assembler is a good thing. It seems to integrate well with the environment, too, so you can write assembler macros in Lisp, which opens up many possibilities.
Continue reading “AVR Bare Metal With Lisp” →