Lisp is a Turing-complete programming language, based on Alonso Church's lambda calculus. It was designed by John McCarthy and published in his 1960 paper, "Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I" [1]. Of its many dialects, Common Lisp and Scheme are the best known, along with the newer Racket and Clojure.
Lisp pioneered many programming language ideas now commonly in use [2], such as higher order functions, recursion, lexical closures, dynamic typing, tree data structures, automatic garbage collection, and the read-eval-print loop (REPL). I've been programming in Common Lisp and Scheme as a hobby for many years. Recently, I discovered uLisp, a version designed to run on microcontrollers (MCUs) [3]. As a fan of Lisp and embedded systems, for the past few years, I've been willing to try the uLisp platform and write about it.
In this article I begin by discussing very simple uLisp examples that showcase basic syntax and programming concepts. Then, I discuss some extensions to the language that deal specifically with MCU-related functionalities, such as general-purpose input/ output and I2C serial data communications. I present some hardware examples using Seeed Studio's Wio Terminal development board and the Sensirion SGP30 gas sensor. Nevertheless, uLisp support as well a few other MCU platforms.
To follow the topics discussed here, you just need a basic knowledge of microcontrollers and the Arduino platform.
ULISP CRASH COURSE
uLisp is available for many MCU boards in five versions [4]. The version of uLisp that you wish to use can be downloaded free from uLisp.com:
1) AVR: for Arduino Mega 2560, ATmega 1284, and AVR DA/DB series.
2) AVR-Nano: for Arduino UNO, Arduino Nano, and Arduino Every.
3) ARM: for Arduino Zero and MKTZero, Adafruit MO, M4, PyBadge/PyGamer, nrf52840 and Clue, BBC Micro Bit, Teensy 40/4.1, RP2040-based boards, and others.
Esta historia es de la edición October 2024 de Circuit Cellar.
Comience su prueba gratuita de Magzter GOLD de 7 días para acceder a miles de historias premium seleccionadas y a más de 9,000 revistas y periódicos.
Ya eres suscriptor ? Conectar
Esta historia es de la edición October 2024 de Circuit Cellar.
Comience su prueba gratuita de Magzter GOLD de 7 días para acceder a miles de historias premium seleccionadas y a más de 9,000 revistas y periódicos.
Ya eres suscriptor? Conectar
Build an Interactive Kinetic Wall
Using a Raspberry Pi 4 and Kinect V1 Camera
Learn to Program MCUs with uLISP
Part 1: Crash Course Offers Insight Into Pioneering Language
Intelligent Automotive Battery Sensor
Shunt Resistors and Evaluation Electronics Offer Two Key Components
Understanding Mesh Circuits How to Use and Calculate Them
Microcontrollers and other digital systems concern mostly ones and zeros but when connections to the real word are needed it can get messy. Stuart writes about mesh analysis and how mesh circuits can be calculated and applied in practical scenarios.
Datasheet: Very Cool Micro Machines
Smartphone Cooling Rounds Out Parade of Advanced MEMS
Improving Patient Outcomes
Device Technology Advances Medical Practices
Bringing Cost-Effective, On-Device AI to Home Appliances - Sparse Weights and Interactions Negate GPUs and Cloud Computing
GPU silicon and cloud computing infrastructure are too costly for mass markets devices like refrigerators and washers. By deploying compute resources only to the necessary parts of AI inference, Sparse AI allows product designers to practically incorporate new AI features like natural voice interfaces into their consumer offerings without breaking the bank or electric bill surprises.
Thin Film Transistor LED Displays - Visual I/O
To add a resistive touchscreen on top of a TFT display, Jeff explores the technology offerings and libraries needed to accomplish his task. Calibrating the touchscreen's computed coordinates with the actual pixel coordinates of the display proved difficult with a modular framework but separating functions allows easy expansion.
Mobile APP Development with React Native
This month, Bob continues his series on mobile app development from an embedded designer's perspective. He programs a React Native app and he offers guidelines for picking a tutorial for React Native. He further explores how it handles concurrency and asynchronous programming. Bob expected a few nuances during the process but to say there were more than a few would be an understatement.
Power Analysis Over JTAG Ports: Hidden Debug Dangers - Block Side-Channel Analysis Attacks
Small changes in the phase of clock signals can encode power leakages. An attacker can use standard interfaces such as the JTAG port to drive clocks across targets, using them as measurement techniques for sidechannel analysis attacks despite limited physical access. This article demonstrates how you can test devices for vulnerability and how to modify devices to prevent attacks.