RSS Feed

Lisp Project of the Day


You can support this project by donating at:

Donate using PatreonDonate using Liberapay

Or see the list of project sponsors.


This library allows you to work with the serial port. It uses cffi to make system calls and should work on Linux, OSX and Windows.

To test it, I wrote this small program for my Arduino UNO:

#include <LiquidCrystal.h>

LiquidCrystal lcd(13, 12, 11, 10, 9, 8);

void setup() {
  lcd.begin(16, 2);

String msg;
int char_pos = 0;
int row = 0;

void loop () {
  if (Serial.available()) {
    char ch =;
    if (ch == '\n') {
      char_pos = 0;
    } else {
      if (char_pos == 0) {
          lcd.setCursor(0, 1);
          lcd.print("                ");
      lcd.setCursor(char_pos, row);

Now, let's send some data to our microcomputer to show the string on the attached LCD:

CL-USER> (cserial-port:with-serial (port "/dev/cu.usbmodem14101")
             "Hello Lisp World!"

And here is the result!

Brought to you by 40Ants under Creative Commons License