Skip to content
Reconstruct Persian/Arabic letters to be used in Arduino IDE and OLED/LCD display with a 8x8 font
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Arduino Persian Reshaper

Reconstruct Persian/Arabic letters to be used in Arduino IDE and OLED/LCD display. This script is compatible to all Arduino family boards such as Arduboy, ESP8266/ESP32, Particle Photon, ....

All displays and libraries that can be set to writepixel(x, y, color) can be used and there is no limit.


Persian/Arabic script is very special with two essential features:

  • It is written from right to left.
  • The characters change shape according to their surrounding characters.

The code attempts to resolve the problem of displaying letters and numbers in Persian/Arabic with a 8x8 font.


Persian Letters on Arduboy Persian Letters on Wemos D1 mini Persian Letters on Particle Photon


First you need to install the Adafruit GFX library (for drawing shapes, lines, ...) of course this is optional, then according to the type of display, install the library you need. Here I used the 128x64 display with SSD1306 chip driver so I installed the Adafruit SSD1306 library.

Download & Usage

Download/Clone repository, change the following lines according to the library you are using:

//This section should be modified according to your display type and library
#define setpixel(x, y, color)           display.writePixel(x, y, color)
#define LCDWidth                        display.width()

//If you use SPI display, change the following lines according to your display type (I used the Arduboy)
#define OLED_DC                         4
#define OLED_CS                         12
#define OLED_RESET                      6
Adafruit_SSD1306 display(OLED_DC, OLED_RESET, OLED_CS);

//If you use i2c display, uncomment this part.
#define OLED_RESET                      4
Adafruit_SSD1306 display(OLED_RESET);

Finally, change the following lines and then upload on the Arduino board:

char txt[] = "فارسی نویسی در آردوینو";

char NUM[] = "0123456789";              //For correct representation, the numbers must be reversed.

راهنمای استفاده به زبان فارسی


Copyright (C) 2018 Sadraldin Rastegar and Ramin Sangesari.


If this project help you reduce time to develop, you can give me a cup of coffee :)

You can’t perform that action at this time.