Roni Bandini β Buenos Aires, Argentina β May 2021
The Nyctograph Machine is an Arduino-powered device that translates ordinary alphabetic text into Lewis Carroll's Nyctographic Square Alphabet and prints the resulting symbols on thermal paper.
A rotary encoder is used to select letters on a 16Γ2 LCD. After entering a 16-character phrase, the Arduino replaces each character with its corresponding 104Γ104 pixel nyctographic bitmap and sends the sequence to a thermal printer.
The project combines Victorian writing technology, substitution alphabets, Arduino electronics and physical printing.
- π Lewis Carroll Nyctographic alphabet
- βΎοΈ Arduino Mega 2560
- ποΈ Rotary encoder text input
- π₯οΈ 16Γ2 IΒ²C LCD
- π§Ύ Thermal printer output
- π‘ 26 bitmap glyphs stored in flash
- πΌοΈ 104Γ104 pixel / 1-bit symbols
- βοΈ 16-character phrase input
- π‘ Status LEDs
- π§ͺ Alphabet test-print mode
- π PDF user's guide included
- π§± Custom 3D-printable enclosure
flowchart LR
USER["π€ User"]
ENC["ποΈ Rotary Encoder"]
LCD["π₯οΈ 16Γ2 LCD"]
MEGA["βΎοΈ Arduino Mega"]
PHRASE["16-character buffer"]
MAP["π‘ Nyctograph glyph lookup"]
BITMAP["104Γ104 bitmaps"]
PRINTER["π§Ύ Thermal Printer"]
USER --> ENC
ENC --> MEGA
MEGA --> LCD
MEGA --> PHRASE
PHRASE --> MAP
BITMAP --> MAP
MAP --> PRINTER
The complete alphabet is stored locally inside the Arduino firmware. No computer or network connection is required during operation.
Lewis Carroll β Charles Lutwidge Dodgson β developed the Nyctograph in 1891 as a way to record ideas while lying in bed without having to light a candle.
He created a small writing guide based on square cells and developed a corresponding alphabet made from dots and strokes.
The common visual rule is a prominent dot in the upper-left corner of each letter symbol, helping identify the beginning of each character.
Carroll recorded the invention on September 24, 1891 and described it publicly in a letter published in The Lady on October 29, 1891.
Historical reference:
π Alice's Adventures in Carroll's Own Square Alphabet β Lewis Carroll Society of North America
The original Nyctograph was designed to help a person write without seeing.
This project reverses the direction:
Conventional alphabet
β
Arduino
β
Nyctographic alphabet
β
Thermal paper
Instead of manually encoding each letter, the Arduino performs the substitution automatically.
The firmware contains:
static char letters[27] =
" ABCDEFGHIJKLMNOPQRSTUVWXYZ";
char phrase[16] = "";The rotary encoder moves through the alphabet:
if (digitalRead(outputB) != aState) {
counter++;
if (counter > 26)
counter = 26;
}
else {
counter--;
if (counter < 0)
counter = 0;
}The selected character appears on the LCD.
Pressing the encoder button stores its numeric index:
phrase[index] = counter;
index = index + 1;
counter = 0;The main phrase buffer is:
char phrase[16] = "";The interface also uses a:
LiquidCrystal_I2C lcd(
0x3F,
16,
2
);After sixteen positions have been entered:
if (index > 15) {the machine begins printing the encoded phrase.
The original project also references the sixteen-cell format associated with Carroll's writing system and the conveniently sixteen-character phrases:
THE WHITE RABBIT
EL CONEJO BLANCO
Each character was converted into a:
104 Γ 104 pixel
1-bit bitmap
and stored in:
π letters.h
The glyph arrays use PROGMEM:
static const uint8_t PROGMEM a[] = {
...
};
static const uint8_t PROGMEM b[] = {
...
};This allows the large bitmap data to remain in program flash instead of occupying SRAM.
The machine uses the Adafruit Thermal Printer library:
#include "Adafruit_Thermal.h"
#include "SoftwareSerial.h"Serial configuration:
#define TX_PIN 12
#define RX_PIN 11
SoftwareSerial mySerial(
RX_PIN,
TX_PIN
);
Adafruit_Thermal printer(
&mySerial
);Printer serial speed:
mySerial.begin(19200);Each symbol is printed as a bitmap:
printer.printBitmap(
104,
104,
a
);
printer.println(F(""));Official documentation:
π Adafruit Mini Thermal Receipt Printer Guide
π Adafruit Thermal Printer Library
flowchart TD
START["Power On"]
LCD["Display Nyctograph 1.0"]
SELECT["ποΈ Select Letter"]
BUTTON{"Encoder pressed?"}
STORE["Store letter"]
FULL{"16 positions?"}
NEXT["Continue entering"]
LOOKUP["Find Nyctographic bitmap"]
PRINT["π§Ύ Print 104Γ104 glyph"]
DONE["Reset phrase"]
START --> LCD
LCD --> SELECT
SELECT --> BUTTON
BUTTON -->|"No"| SELECT
BUTTON -->|"Yes"| STORE
STORE --> FULL
FULL -->|"No"| NEXT
NEXT --> SELECT
FULL -->|"Yes"| LOOKUP
LOOKUP --> PRINT
PRINT --> DONE
DONE --> SELECT
The firmware includes a test-print function.
Default:
int alphaPrint = 0;Change to:
int alphaPrint = 1;to activate the alphabet printing routine at startup.
This is useful for checking the bitmap conversion, thermal-printer connection and print quality.
Two LEDs are configured:
#define ledA 8
#define ledB 9They are used to indicate startup, debug printing and normal printing activity.
| Component | Arduino Mega |
|---|---|
| LCD SDA | A4 |
| LCD SCL | A5 |
| Printer RX / Yellow | D12 |
| Printer TX / Green | D11 |
| Encoder button | D5 |
| Encoder A | D6 |
| Encoder B | D7 |
| LED A | D8 |
| LED B | D9 |
Firmware definitions:
#define outputA 6
#define outputB 7
#define buttonA 5
#define ledA 8
#define ledB 9The encoder button uses:
pinMode(
buttonA,
INPUT_PULLUP
);| Component | Quantity |
|---|---|
| Arduino Mega 2560 | 1 |
| Thermal receipt printer | 1 |
| 16Γ2 IΒ²C LCD | 1 |
| Rotary encoder with push button | 1 |
| LED | 2 |
| Main switch | 1 |
| Power supply | 1 |
| Thermal paper | 1 roll |
| 3D-printed enclosure | 1 |
The first prototype used an Arduino Nano, but storing the full bitmap alphabet exceeded the available program-memory resources, so the final machine moved to the Arduino Mega 2560.
The Mega provides an ATmega2560, 16 MHz clock and substantially more flash memory.
π Arduino Mega 2560 Documentation
The sketch uses:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include "Adafruit_Thermal.h"
#include "SoftwareSerial.h"
#include "letters.h"π Adafruit Thermal Printer Library
Install a compatible LiquidCrystal_I2C library through the Arduino Library Manager.
Included with Arduino.
Included with the AVR Arduino core.
π Download Arduino IDE
Install:
Arduino AVR Boards
and select:
Arduino Mega or Mega 2560
git clone https://github.com/ronibandini/nyctograph.git
cd nyctographRepository:
π github.com/ronibandini/nyctograph
Install:
LiquidCrystal_I2CAdafruit Thermal Printer
Open:
π nyctograph7.ino
Compile and upload to the Arduino Mega.
Serial Monitor:
9600 baud
The printer itself communicates at:
19200 baud
Startup LCD:
Nyctograph 1.0
Roni Bandini
The repository includes the original PDF manual:
π Nyctograph.pdf
It can be used as a compact reference for the machine and its alphabet.
The custom case was modeled to integrate:
- Arduino Mega
- Thermal printer
- LCD
- Rotary encoder
- LEDs
- Power electronics
Printable model:
π Nyctograph β Thingiverse
The original build was designed in:
π Autodesk Fusion
nyctograph/
β
βββ nyctograph7.ino
βββ letters.h
βββ Nyctograph.pdf
βββ README.md
- βοΈ
nyctograph7.inoβ main Arduino firmware - π‘
letters.hβ nyctographic bitmap alphabet - π
Nyctograph.pdfβ user's guide - π
README.mdβ original repository documentation
Complete original build article including the electronics, bitmap conversion, rotary interface, enclosure and thermal-printer setup.
π The Nyctograph Machine β Hackster.io
Historical background on Carroll's original Nyctograph and Square Alphabet:
π Alice's Adventures in Carroll's Own Square Alphabet
Current hardware documentation:
Thermal-printer setup, serial communication and bitmap printing:
π Mini Thermal Receipt Printer Guide
π Bitmap / Arduino Printer Documentation
Project overview published shortly after the original release:
π The Nyctograph Machine β jpralves.net
Arduino-controlled literary reading machine based on Juan Esteban Fassio's interpretation of Raymond Roussel.
π github.com/ronibandini/RousselReadingMachine
A dedicated eInk device designed specifically for reading haiku.
π github.com/ronibandini/haikureader
Raspberry Pi literary installation combining animated writing and ASCII portraits.
π github.com/ronibandini/HunterSThompsonAscii
Literary experiment using NFC cards as physical containers for micropoetry.
π github.com/ronibandini/MIFAREPoetry
A 1998 Furby rebuilt as a Jorge Luis Borges animatronic.
π github.com/ronibandini/furby
Contracultura Maker is a book by Roni Bandini about maker culture, experimental electronics, AI, physical computing and technological autonomy.
π Contracultura Maker β GitHub repository
π Download Contracultura Maker PDF
Roni Bandini Maker Β· AI Developer Β· Writer Buenos Aires, Argentina
- π GitHub β @ronibandini
- π Medium β @ronibandini
- π X / Twitter β @RoniBandini
- πΈ Instagram β @ronibandini
βΆοΈ YouTube β @RoniBandini- πΌ LinkedIn β Roni Bandini
Built with π + literature + Arduino + thermal paper.