Using routers as dev boards has been a long and cherished tradition in the circles we frequent, and finally design houses in China are taking notice. There have been a few ‘Internet of Things’ boards in recent months that have taken the SoC found in low-end routers, packaged the on a board with USB, some GPIOs, and a fair bit of memory and called it a dev board. The ZERO Plus is not an exception to this trend, but it does include a very interesting feature when it comes to the development environment: this one uses Lisp as its native language.
The Zero Plus is pretty much what you would expect from a router SoC being transplanted to an Internet of Things board: it uses the Ralink RT5350 SoC, giving it 802.11b/g/n, has 32MB of RAM, 8 or 16 M of Flash, I2C, I2S, SPI, USB, two UARTs, and 14 GPIOs. There is support for a webcam, temperature and humidity sensor, displays, and Arduino via a breakout board that appears to contain a standard, DIP-sized ATMega328,
All of that could be found in dozens of other boards, though. What really sets this one apart is the Lisp development environment. Programming the Zero is exactly as elegant as you would expect, with a ‘toggle a LED according to what time it is’ program looking something like this:
(define LED_On (lambda ()(dev.gpio 11 "out" 1))) (define LED_Off (lambda ()(dev.gpio 11 "out" 0))) (define CurrentTime? (lambda () (int (time.strftime "%H" (time.localtime (time.time)))))) (define Night? (lambda () (and (> ( CurrentTime? ) 16) (< ( CurrentTime? ) 23) ) ) ) (if (Night?) (LED_On) (LED_Off)
Dev boards built around somewhat more esoteric programming language isn’t anything new; The Espruino brings Javascript to ARM microcontrollers, and the MicroPython project is an astonishing undertaking and successful Kickstarter that brings the BASIC for the 21st century to the embedded world. Lisp, though… I don’t think anyone expected that. It’s a great way to differentiate your product, though.
That unrequited paren is killing me.
As well as the rparen-slide at the end of the definiton of Night?. That said, it sounds pretty neat :D
The headline was a joke. The code snippet was me struggling with wordpress.
micropython is available on the teensy 3.1 in the store… (I don’t mean it comes with that option – you have to load it yourself.) Hint to hackaday ?
Shouldn’t the language in question be called “Lithp”?
Just sayin’ :P
That would restrict it to an interdental lisp, leaving out all the other great lisps, such as my personal favorite: the lateral lisp (cf. Sid the Sloth).
I didn’t know there was more than one kind of lisp…
That’s actually kind of interesting.
Can I get one with better enunciation?
Lots of Annoying Single Parens.
Now a PROLOG board would be interesting.
…LASP.
sorry (= Annoying Irritating)
nil
Lisp makes Zero+ unique and geek, but Zero+ is more than an IOT controller.
Behind the Zero+ hardware(SoC for home router), there are customized OpenWRT system, Language Interpreter(customized LISP), Cloud Service and Web IDE. So all of these composite an IOT platform. You can define the execution logic both in Cloud and in Zero+ by writing code in Zero+ Web IDE. By using customized LISP language, you can define your own program syntax.Just use websocket in your web application, you can interact with Zero+ cloud service and your Zero+.
The goal is to provide a Simple, Interesting and Efficient IOT platform.
(define LED (lambda (mode) (dev.gpio 11 “out” mode)))
(define on 1)
(define off 1)
(define CurrentHour (lambda ()
(int (time.strftime “%H” (time.localtime (time.time)))))
(define Night? (lambda ()
(let (current-hour (CurrentHour))
(and
(> current-hour 16)
(< current-hour 23))))
(if (Night?)
(LED on)
(LED off))
— endbugs
Yeah, we do have a code tag. I’m not going to edit that for you, though.
Looks like at least one bug on the third line. But eminently more readable.
Looks more like a Scheme derivative to me.
The Lisp used in Zero+ is more like a Scheme. The Lisp interpreter is designed by SmartMatrix team. They referred the Scheme.
Who is the source of the Lisp? Glad to see this, it would be nice to program in a high level language for a change.
The Lisp interpreter is designed by SmartMatrix team. The interpreter runs both at Zero+ and Zero+ cloud service. You can define the execution logic both in Cloud and in Zero+ by writing code in Zero+ Web IDE. Just use websocket in your web application, you can interact with Zero+ cloud service and your Zero+. The goal is to provide a Simple, Interesting and Efficient IOT platform. About the open source plan, please refer the Zero+ indiegogo page: https://www.indiegogo.com/projects/zero-plus-prototype-your-iot-product-in-seconds
That reminds me of that long list of how programmers of different languages catch a lion.
The lisp programmer will create a maze of braces and hopes the lion will get lost in it
Looks like they went with an HLK-RM10 (pretty close to the HLK-RM04 that has been previously featured on HaD)
Please explain why this “lisp” is using underscores, periods as delimiters, C-style format directives, and capitalization.
This “lisp” is customised. The interpreter of this “lisp” is designed by SmartMatrix team.
packaged ‘the’ on a board with USB…
Lua’s been around for SoCs for years, but dormant of late. Eluaproject.net