يحاول ذهب - حر

Learn Lisp Programming Using MCUS

March 2025

|

Circuit Cellar

Part 3—Forward Kinematics in µLisp

- Raul Alvarez

Learn Lisp Programming Using MCUS

µLisp is a dialect of the Lisp programming language for MCUs with limited RAM. In Part 1, Raul presented µLisp concepts and syntax, and extensions specific to MCUs, and in Part 2, he added extensions by using custom functions. In Part 3 of this article series, he implements a new extension to multiply matrices, and uses µLisp to implement forward kinematics for a mini robotic arm.

In this last part of the series on Lisp programming with microcontrollers, we will use everything we previously learned about µLisp programming. We will compute "forward kinematics" (the process of computing the pose of a robotic arm, based on the angles of its rotating joints), using homogeneous transformations for the three-degrees-of-freedom (3DOF) mini robotic arm presented in Part 2 of this article series [1]. To achieve this, we will implement a matrix multiplication extension to µLisp. Along the way, we will also continue to further explore the Lisp programming language, while we challenge ourselves with math and the fundamental concepts of robotic arm kinematics.

To follow the topics discussed here, you need to be familiar with Arduino and µLisp programming. Please see the first two parts of this article series for information [1, 2]. "Robot kinematics" refers to the relation between the geometry and movement of a robot. It is also desirable to have some background in robot kinematics with the Denavit-Hartenberg convention and homogeneous transformations, so I will give a simple explanation of the basics. The latter, however, is really tangential to the subject of the entire article series.

LISTS AND ARRAYS

Lists are one of the most fundamental data structures in Lisp. In Part 1, I discussed how to create them. Lines 1-2 from Listing 1 are a reminder of two equivalent methods discussed. However, there's a third method of creating lists by "consing" atoms (Lisp primordial objects) with the

المزيد من القصص من Circuit Cellar

Circuit Cellar

Circuit Cellar

A GPS-Disciplined Frequency Counter using the PSoC 5LP

In this month's column, Brian tasks one of his mixed-signal favorite MCUs, the Infineon PSoC 5LP, to build a frequency/ period counter using a GPS satellite module to discipline the project's time base.

time to read

16 mins

November 2025

Circuit Cellar

Designing Analog Electronics

Part 1: Error and Uncertainty

time to read

23 mins

November 2025

Circuit Cellar

Samtec Launches 800-Position AcceleRate HP High-Performance Array Connectors

Samtec, Inc., a global leader in high-performance interconnect solutions and a service leader in the industry, announces the expansion of its AcceleRate HP product line with the release of 800-position APM6 and APF6 high-performance array connectors available in a low-profile 5mm stack height.

time to read

1 min

November 2025

Circuit Cellar

Circuit Cellar

CIA for SBCs (and More)

Securing Embedded Systems from Evolving Threats

time to read

14 mins

November 2025

Circuit Cellar

Circuit Cellar

The Future of Embedded Systems and AI: AI in Embedded Systems

Cybersecurity Challenges and Opportunities in a Smarter World

time to read

4 mins

November 2025

Circuit Cellar

Circuit Cellar

An ESP32 Dashboard

Monitoring How a Popular Microcontroller Uses Resources

time to read

11 mins

November 2025

Circuit Cellar

Circuit Cellar

Vishay Intertechnology Power Metal Strip Resistor Delivers Power to 5 W in Compact 1206 Case Size

Vishay Intertechnology, Inc. introduced a new surfacemount Power Metal Strip current sense resistor that combines a high power rating up to 5W, TCR down to ± 75ppm/°C, and extremely low resistance values down to 0.3mΩ in the compact 1206 case size.

time to read

2 mins

November 2025

Circuit Cellar

Circuit Cellar

ROHM Develops New Smart Switches Optimized for Zonal Controllers

ROHM Semiconductor announced the release of six new high-side smart switches (IPDs: Intelligent Power Devices) featuring highly accurate current sensing and low ON resistances ranging from 9mΩ to 180mΩ.

time to read

1 min

November 2025

Circuit Cellar

Circuit Cellar

Bourns Expands Semi-Shielded Power Inductor Portfolio with New Series Featuring Higher Maximum Inductance Values

Bourns, Inc., a leading manufacturer and supplier of electronic components for power, protection, and sensing solutions, announced the expansion of its semi-shielded power inductors.

time to read

1 min

November 2025

Circuit Cellar

Circuit Cellar

STMicroelectronics' New Automotive Linear Voltage Regulator Preserves Battery Energy in Challenging Conditions

The TL99VR03 300mA low-dropout (LDO) regulator provides resilient and efficient power, with a wide input-voltage range and very low quiescent current consumption, only 3.5µA at no load. The IC has an enable pin for turning the regulator off, which reduces the idle current to 800nA, and integrates soft-start circuitry to limit current during power-up and fault recovery.

time to read

1 min

November 2025

Listen

Translate

Share

-
+

Change font size