This guide is going to bring something "new" to the table. Adafruit's SAMD21 (aka M0) and SAMD51 (aka M4) boards provide impressive support for various programming options, some of which haven't really been a viable option on microcontrollers. Of course, there's C and C++. That's available for pretty much any microcontroller ever. The '21 and especially the '51 throw open the gates to higher level languages such as Makecode/Javascript and CircuitPython.

Arduino/C/C++ is the classic way for makers to write code for microcontrollers. It's complex, demanding, and requires fine attention to detail. It can also be intimidating to new makers.

Makecode is a wonderful way for beginners to get started making microcontroller based things quickly and easily. It lets you code without getting bogged down in syntax, indentation, etc.

CircuitPython is the new kid on the block. It's a fork of MicroPython primarily for Adafruit's SAMD series of boards, extending MicroPython to make it even easier to get up and running. MircoPython has been around since May 2014, but CircuitPython's first (pre-)release was in Aug 2016, making it quite new. The SAMD boards have the memory and speed to make Python a viable alternative.

So with all this, why look at other alternatives? Partly because it can be fun to learn new ways to do things. But also, the more tools you have available, the more versatile you can be.

This guide will have a look at a couple languages that can be used for programming microcontrollers that haven't really been mainstream in the maker world yet: Forth and Lisp.

While we'll mainly look at using these with the latest M4 boards from Adafruit (Metro, ItsyBitsy, and Feather), there are Forth and Lisp implementations available for boards all the way down to the venerable Arduino UNO. Of course, the more capable microcontrollers boards (especially those using the SAMD51) will be able to do more, and do it faster.

Forth and Lisp are very, very different languages. Yet they have some things in common: they look nothing like C, Python, Ruby, JavaScript, or probably most programming languages you've used. Another thing they share is that they've both been around for a long time. Lisp dates back to 1958 and the beginning of the AI (Artificial Intelligence) Lab at MIT. In fact the fellow who conceived of and designed Lisp, John McCarthy, also came up with the phrase "artificial intelligence". Forth is slightly newer, dating back to the late 1960s work by Charles Moore.

Learning Lisp or Forth isn't just learning a slightly different syntax; it's learning a new way of programming. If that idea excites you, this guide will give a very brief introduction to each language, an implementation of each that will run easily on the new M4 boards, and pointers to more information. Neither implementation has the level of polish that CircuitPython has, or that of more mature workstation implementations. That said, they are gradually improving.

Of course there are implementations available for more capable computers as well, especially Linux-based ones. So if Raspberry Pi is your jam, you have a wealth of alternatives available for both of these languages.

Adafruit Metro M4 feat. Microchip ATSAMD51

Are you ready? Really ready? Cause here comes the fastest, most powerful Metro ever. The Adafruit Metro M4 featuring the Microchip ATSAMD51. This...

Adafruit Feather M4 Express - Featuring ATSAMD51

It's what you've been waiting for, the Feather M4 Express featuring ATSAMD51. This Feather is fast like a swift, smart like an owl, strong like a ox-bird (it's half ox,...

Adafruit ItsyBitsy M4 Express featuring ATSAMD51

What's smaller than a Feather but larger than a Trinket? It's an Adafruit ItsyBitsy M4 Express featuring the Microchip ATSAMD51! Small,...

The key image of this guide is the logo of MIT/GNU Scheme, the canonical implementation of the Scheme dialect of Lisp. It is shared under the terms of the GNU Free Documentation License, Version 1.2. It was chosen here because it portrays the recursive nature of programming in Lisp.

Last updated on Aug 10, 2018 Published on Aug 10, 2018