Thursday, April 12, 2018

Arduino Writing Arabic Font - How to Write Arabic Letters with Arduino

How to write Arabic words using Arduino


This post will be so important to people speaking Arabic language and to all people using languages other than languages used with Arduino.


Arabic Letters on Arduino

In this post I came across a new way to use Arduino for Arabic people.

This project used Arduino to write Arabic words on an LCD using Arduino board.

This Arduino command is used to create custom characters.


https://www.arduino.cc/en/Reference/LiquidCrystalCreateChar


Components



Connections




Circuit




Code



/*This to write an Arabian character on LCD 1602
Code written for Arabduino initiative
You can share Your project on genotronex blog
read More :
http://www.genotronex.com/p/blog-page_6281.html
http://www.genotronex.com/
*/
#include
LiquidCrystal lcd(8,9,4,5,6,7);

// هنا نرسم الاشكال :
byte heart[8] = {
  0b00000,
  0b01010,
  0b11111,
  0b11111,
  0b11111,
  0b01110,
  0b00100,
  0b00000
};

byte Lam[8] = {
  0b10000,
  0b10000,
  0b10000,
  0b10000,
  0b10000,
  0b10001,
  0b11110,
  0b00000
};

byte mem[8] = {
  0b00000,
  0b00000,
  0b00000,
  0b00110,
  0b01001,
  0b11110,
  0b00000,
  0b00000,
};

byte thae[8] = {
  0b00100,
  0b00000,
  0b00000,
  0b01110,
  0b10001,
  0b11111,
  0b00000,


  0b00000,

};
byte non[8] = {
  0b00100,
  0b00000,
  0b00000,
  0b10001,
  0b10001,
  0b10001,
  0b01110,
  0b00000
};

byte raa[8] = {
  0b00000,
  0b00000,
  0b00010,
  0b00001,
  0b00001,
  0b00010,
  0b00100,
  0b01000
};
void setup() {
  lcd.createChar(1, heart);
  lcd.createChar(2, Lam);
  lcd.createChar(3, mem);
  lcd.createChar(4, thae);
  lcd.createChar(5, raa);
  lcd.createChar(6, non);

  lcd.begin(16, 2);
 
  //هنا  نطبع الكلام.
  lcd.print("I ");
  lcd.write(1);
  lcd.print(" ramadan ");
   lcd.setCursor(0,1);
//,  جرب احذف الكود وشوف كيف تكون النتيجة ح يتلخبط الكلام   { lcd.setCursor(0,1)}
 //بس لو كتبت الكود , ح ينزل  سطر, وكلام يكون واضح
  lcd.write(6);
  lcd.write(2);
  lcd.write(4);
  lcd.write(3);
lcd.write(5);
}

void loop() {}















No comments: