Giter VIP home page Giter VIP logo

arduino-persian-reshaper's Introduction

Arduino Persian Reshaper

Simple 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.

Description

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.

Screenshot

See more screenshots here.

Persian Letters on Arduboy

Prerequisites

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[] = "فارسی نویسی در آردوینو";
PutCharPE(txt,ALINE_CENTER(txt),8,1,BLACK);

char NUM[] = "0123456789";              //For correct representation, the numbers must be reversed.
PutCharPE(strreverse(NUM),ALINE_CENTER(NUM),30,1,BLACK);

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

Contact

Copyright (C) 2018 Sadraldin Rastegar and Ramin Sangesari.

Donation

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

arduino-persian-reshaper's People

Contributors

idreamsi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.