# Big Numbers in Arabic font

**URL:** <https://forum.arduino.cc/t/big-numbers-in-arabic-font/1208825>\
**Category:** Displays\
**Created:** [January 9, 2024, 5:53am UTC](https://forum.arduino.cc/t/big-numbers-in-arabic-font/1208825 "2024-01-09T05:53:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![drmina2023](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/drmina2023/32/1013044_2.png) [@drmina2023](https://forum.arduino.cc/u/drmina2023)\
**Post date:** [January 9, 2024, 5:53am UTC](https://forum.arduino.cc/t/big-numbers-in-arabic-font/1208825/1 "2024-01-09T05:53:08Z")

</div>

As I'd like to add Arabic Numbers to my LCD I2C project, I followed the instructions in this tutorials.

[![](https://europe1.discourse-cdn.com/arduino/original/4X/1/7/6/17699d0f936e99f56440348c53a6c43da3ab6d05.jpeg "#23 LCD BIG DIGITS for your Arduino using I2C - Easy!") ](https://www.youtube.com/watch?v=8ZsUcUAsL3I)

and here is code provided by the Author on GIThub

[LCD\_Big\_digits/LCD\_CustChar\_Demo\_2\_With\_Serial\_Window\_Stepthru/LCD\_CustChar\_Demo\_2\_With\_Serial\_Window\_Stepthru.ino at master · RalphBacon/LCD\_Big\_digits (github.com)](https://github.com/RalphBacon/LCD_Big_digits/blob/master/LCD_CustChar_Demo_2_With_Serial_Window_Stepthru/LCD_CustChar_Demo_2_With_Serial_Window_Stepthru.ino)

And here is my version, All What I did is changed the sequence of the second array to display Arabic numbers instead of the English numbers.

```arduino
#include <Adafruit_LiquidCrystal.h>
#include <Keypad.h>

const int ROW_NUM = 4; // four rows
const int COLUMN_NUM = 4; // four columns

char keys[ROW_NUM][COLUMN_NUM] = {
  {'1','2','3', 'A'},
  {'4','5','6', 'B'},
  {'7','8','9', 'C'},
  {'*','0','#', 'D'}
};

byte pin_rows[ROW_NUM] = {9, 8, 7, 6}; // connect to the row pinouts of the keypad
byte pin_column[COLUMN_NUM] = {5, 4, 3, 2}; // connect to the column pinouts of the keypad

Keypad keypad = Keypad(makeKeymap(keys), pin_rows, pin_column, ROW_NUM, COLUMN_NUM );

Adafruit_LiquidCrystal lcd_1(0);

uint8_t custChar[8][8] = {
  {31, 31, 31, 0, 0, 0, 0, 0}, // Small top line - 0
  {0, 0, 0, 0, 0, 31, 31, 31}, // Small bottom line - 1
  { B11111,
    B00000,
    B00000,
    B00000, // This shows an alternative
    B00000, // way of defining a custome character,
    B00000, // a bit more 'visually' perhaps?
    B00000,
    B11111,
  },
  //{31, 0, 0, 0, 0, 0, 0, 31}, // Small lines top and bottom -2
  {0, 0, 0, 0, 0, 0, 0, 31}, // Thin bottom line - 3
  {31, 31, 31, 31, 31, 31, 15, 7}, // Left bottom chamfer full - 4
  {28, 30, 31, 31, 31, 31, 31, 31}, // Right top chamfer full -5
  {31, 31, 31, 31, 31, 31, 30, 28}, // Right bottom chamfer full -6
  {7, 15, 31, 31, 31, 31, 31, 31}, // Left top chamfer full -7
};

// Define our numbers 0 thru 9
// 254 is blank and 255 is the "Full Block"
uint8_t bigNums[10][6] = {
  {1, 254, 254, 0, 254, 254}, //0
  {254, 255, 254, 254, 255, 254}, //1
  {255, 0, 0, 255, 254, 254}, //2
  {255, 3, 255, 255, 254, 254}, //3
  {7, 2, 0, 5, 3, 1}, //4
  {254, 1, 254, 4, 1, 6}, //5
  {0, 0, 5, 254, 254,255}, //6
  {255, 254, 255, 4, 1, 6}, //7
  {7, 0, 5, 255, 254, 255}, //8
  {255, 2, 5, 255, 254, 254}, //9
};

void setup() {
  // Initiate the LCD:
  lcd_1.begin(16,2);
}  
 
int cursorColumn = 0;

void printBigNum(int number, int startCol, int startRow) {

  // Position cursor to requested position (each char takes 3 cols plus a space col)
  lcd_1.setCursor(startCol, startRow);

  // Each number split over two lines, 3 chars per line. Retrieve character
  // from the main array to make working with it here a bit easier.
  uint8_t thisNumber[6];
  for (int cnt = 0; cnt < 6; cnt++) {
    thisNumber[cnt] = bigNums[number][cnt];
  }

  // First line (top half) of digit
  for (int cnt = 0; cnt < 3; cnt++) {
    lcd_1.print((char)thisNumber[cnt]);
  }

  // Now position cursor to next line at same start column for digit
  lcd_1.setCursor(startCol, startRow + 1);

  // 2nd line (bottom half)
  for (int cnt = 3; cnt < 6; cnt++) {
    lcd_1.print((char)thisNumber[cnt]);
  }
}

void loop(){
  char key = keypad.getKey();
 
  if (key) {
    lcd_1.setCursor(cursorColumn,0); // move cursor to (cursorColumn, 0)
    //lcd_1.print(key); // print key at (cursorColumn, 0)
    
    printBigNum(key, cursorColumn, 0);

    
    cursorColumn+=4; // move cursor to next position
    if(cursorColumn > 16) { // if reaching limit, clear LCD
      lcd_1.clear();
      cursorColumn = 0;
    }
  }
  
}

```

And here is the link to the simulation on tinkercad

> **[Login | Tinkercad](https://www.tinkercad.com/login?next=%2Fthings%2FlFBwwTTgeEI-bignumbers-of-spectacular-jarv)**

it seems that my code works partially except for not being able to display the supposed Characters?  
What is the possible fix for that.

---

<div class="post-metadata">

**Author:** ![pert](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/pert/32/217111_2.png) [@pert](https://forum.arduino.cc/u/pert)\
**Post date:** [January 9, 2024, 6:13am UTC](https://forum.arduino.cc/t/big-numbers-in-arabic-font/1208825/2 "2024-01-09T06:13:46Z")

</div>

I moved your topic to an appropriate forum category @drmina2023.

I have had to do this with your topics multiple times. It seems that polite requests for you to use the forum responsibly are not sufficient so I have given you a two day suspension. Upon your return, I hope that you will start behaving more respectfully.

In the future, please take some time to pick the [forum category](https://forum.arduino.cc/categories) that best suits the subject of your topic. There is an " **About the \_\_\_\_\_ category**" topic at the top of each category that explains its purpose.

This is an important part of responsible forum usage, as explained in [the " **How to get the best out of this forum**" guide](https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum/679966). The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

---

<div class="post-metadata">

**Author:** ![docdoc](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/docdoc/32/220907_2.png) [@docdoc](https://forum.arduino.cc/u/docdoc)\
**Post date:** [January 9, 2024, 11:15am UTC](https://forum.arduino.cc/t/big-numbers-in-arabic-font/1208825/3 "2024-01-09T11:15:22Z")

</div>

> [@drmina2023](#):
>
> And here is the link to the simulation on tinkercad

It seems the link doesn't work anymore (the project has been deleted?)...

---

<div class="post-metadata">

**Author:** ![david\_2018](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/david_2018/32/1013044_2.png) [@david\_2018](https://forum.arduino.cc/u/david_2018)\
**Post date:** [January 9, 2024, 12:10pm UTC](https://forum.arduino.cc/t/big-numbers-in-arabic-font/1208825/4 "2024-01-09T12:10:16Z")

</div>

You defined the array of custom character data, but I don't see anywhere that you actually send the custom character data to the display.

---

<div class="post-metadata">

**Author:** ![ruilviana](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ruilviana/32/722429_2.png) [@ruilviana](https://forum.arduino.cc/u/ruilviana)\
**Post date:** [January 9, 2024, 7:26pm UTC](https://forum.arduino.cc/t/big-numbers-in-arabic-font/1208825/5 "2024-01-09T19:26:51Z")

</div>

@drmina2023  
See if the code below meets your needs.  
The library can be found in the link placed after #include;

How it works can be seen in the simulator:

> **[BigNumbers - Wokwi ESP32, STM32, Arduino Simulator](https://wokwi.com/projects/386456770090127361)**
>
> Run IoT and embedded projects in your browser: ESP32, STM32, Arduino, Pi Pico, and more. No installation required!

```arduino
#include <LiquidCrystal.h>
#include <BigNumbers.h> // https://github.com/seanauff/BigNumbers/tree/master
//#include "BigNumbers.h" // https://github.com/seanauff/BigNumbers/tree/master 
const int lcdD7Pin = 10; // LCD D7 pin
const int lcdD6Pin = 11; // LCD D6 pin
const int lcdD5Pin = 12; // LCD D5 pin
const int lcdD4Pin = 13; // LCD D4 pin
const int lcdEPin = 14; // LCD E Pin
const int lcdRSPin = 15; // LCD RS pin
LiquidCrystal lcd(lcdRSPin, lcdEPin, lcdD4Pin, lcdD5Pin, lcdD6Pin, lcdD7Pin);
BigNumbers bigNum(&lcd);

#include <Keypad.h>
const int ROW_NUM = 4; // four rows
const int COLUMN_NUM = 4; // four columns
char keys[ROW_NUM][COLUMN_NUM] = {
  {'1', '2', '3', 'A'},
  {'4', '5', '6', 'B'},
  {'7', '8', '9', 'C'},
  {'*', '0', '#', 'D'}
};
byte pin_rows[ROW_NUM] = {9, 8, 7, 6}; // connect to the row pinouts of the keypad
byte pin_column[COLUMN_NUM] = {5, 4, 3, 2}; // connect to the column pinouts of the keypad
Keypad keypad = Keypad(makeKeymap(keys), pin_rows, pin_column, ROW_NUM, COLUMN_NUM );

int count = 0;
long acc = 0;
//------------------------------------------------------------------------------
void setup() {
  Serial.begin(115200);
  lcd.begin(16, 2);
  bigNum.begin(); // set up BigNumbers
  lcd.clear(); // clear display
}
//------------------------------------------------------------------------------
void loop() {
  long key = keypad.getKey();
  if (key) {
    long convKey;
    if (key >= 30 or key <= 39)
    {
      convKey = key & 0x0F;
      acc = acc + convKey;
      bigNum.displayLargeInt(acc, 0, 5, false);
      acc = acc * 10;
      count++;
      if(count > 5)
      {
        lcd.clear(); // clear display
        count = 0;
        acc = 0;
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![drmina2023](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/drmina2023/32/1013044_2.png) [@drmina2023](https://forum.arduino.cc/u/drmina2023)\
**Post date:** [January 13, 2024, 7:22am UTC](https://forum.arduino.cc/t/big-numbers-in-arabic-font/1208825/6 "2024-01-13T07:22:42Z")

</div>

@docdoc  
here is a new link

---

<div class="post-metadata">

**Author:** ![drmina2023](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/drmina2023/32/1013044_2.png) [@drmina2023](https://forum.arduino.cc/u/drmina2023)\
**Post date:** [January 13, 2024, 7:26am UTC](https://forum.arduino.cc/t/big-numbers-in-arabic-font/1208825/7 "2024-01-13T07:26:50Z")

</div>

@david_2018 Sorry for my late answer but can't you help me to modify the code to do that, especially the original tutorial works extremely well in the video above .

---

<div class="post-metadata">

**Author:** ![drmina2023](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/drmina2023/32/1013044_2.png) [@drmina2023](https://forum.arduino.cc/u/drmina2023)\
**Post date:** [January 13, 2024, 7:31am UTC](https://forum.arduino.cc/t/big-numbers-in-arabic-font/1208825/8 "2024-01-13T07:31:54Z")

</div>

@ruilviana  
I knew this library, but I'd like to display Arabic big Numbers, so the first code suits me better.  
I hope you can tinker it on Tinker cad to check its problem.  
here is the Link

> **[Login | Tinkercad](https://www.tinkercad.com/login?next=%2Fthings%2FlFBwwTTgeEI-bignumbers-of-spectacular-jarv)**

---

<div class="post-metadata">

**Author:** ![odometer](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/odometer/32/1013044_2.png) [@odometer](https://forum.arduino.cc/u/odometer)\
**Post date:** [January 13, 2024, 8:15am UTC](https://forum.arduino.cc/t/big-numbers-in-arabic-font/1208825/9 "2024-01-13T08:15:25Z")

</div>

> [@ruilviana](#):
>
> ` if (key >= 30 or key <= 39)`

Shouldn't that be  
` if (key >= 0x30 or key <= 0x39)`  
?

---

<div class="post-metadata">

**Author:** ![drmina2023](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/drmina2023/32/1013044_2.png) [@drmina2023](https://forum.arduino.cc/u/drmina2023)\
**Post date:** [January 13, 2024, 8:22am UTC](https://forum.arduino.cc/t/big-numbers-in-arabic-font/1208825/10 "2024-01-13T08:22:42Z")

</div>

I'm Not really sure about that Line  
But Should you check this copy of Wokwi

> **[BigNumbers CopyMina - Wokwi ESP32, STM32, Arduino Simulator](https://wokwi.com/projects/386793675515666433)**
>
> Run IoT and embedded projects in your browser: ESP32, STM32, Arduino, Pi Pico, and more. No installation required!

I tinkered it , but still has some glitches.

---

<div class="post-metadata">

**Author:** ![odometer](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/odometer/32/1013044_2.png) [@odometer](https://forum.arduino.cc/u/odometer)\
**Post date:** [January 13, 2024, 8:40am UTC](https://forum.arduino.cc/t/big-numbers-in-arabic-font/1208825/11 "2024-01-13T08:40:47Z")

</div>

> [@drmina2023](#):
>
> I tinkered it , but still has some glitches.

You forgot your `break;` for your `case 3:` and your `case 7:` for those two digits.

---

<div class="post-metadata">

**Author:** ![drmina2023](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/drmina2023/32/1013044_2.png) [@drmina2023](https://forum.arduino.cc/u/drmina2023)\
**Post date:** [January 13, 2024, 10:25am UTC](https://forum.arduino.cc/t/big-numbers-in-arabic-font/1208825/12 "2024-01-13T10:25:28Z")

</div>

Exactly, this why those 2 numbers were faulty, that's great.  
The point now how to download only the aabic library from the rest of the project

---

<div class="post-metadata">

**Author:** ![david\_2018](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/david_2018/32/1013044_2.png) [@david\_2018](https://forum.arduino.cc/u/david_2018)\
**Post date:** [January 13, 2024, 10:43am UTC](https://forum.arduino.cc/t/big-numbers-in-arabic-font/1208825/13 "2024-01-13T10:43:00Z")

</div>

I don't have the hardware to test with the Adafruit library, but the major problem with your original code is that you never sent the custom character data to the LCD display. If the remainder of the code is correct, this should work:

```arduino
void setup() {
  // Initiate the LCD:
  lcd_1.begin(16, 2);
  for (byte i = 0; i < sizeof(custChar) / sizeof(custChar[0]); i++) {
    lcd_1.createChar(i, custChar[i]);
  }
}

```

---

<div class="post-metadata">

**Author:** ![docdoc](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/docdoc/32/220907_2.png) [@docdoc](https://forum.arduino.cc/u/docdoc)\
**Post date:** [January 13, 2024, 11:08am UTC](https://forum.arduino.cc/t/big-numbers-in-arabic-font/1208825/14 "2024-01-13T11:08:31Z")

</div>

> [@drmina2023](#):
>
> here is the Link

Nope.  
 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/7/d/4/7d461d6f25760fc103937741d7ea46e63efc585a.png)

Please either link to a project you don't delete, or switch to Wokwi.

---

<div class="post-metadata">

**Author:** ![docdoc](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/docdoc/32/220907_2.png) [@docdoc](https://forum.arduino.cc/u/docdoc)\
**Post date:** [January 13, 2024, 11:50am UTC](https://forum.arduino.cc/t/big-numbers-in-arabic-font/1208825/15 "2024-01-13T11:50:21Z")

</div>

> [@drmina2023](#):
>
> but I'd like to display Arabic big Numbers

I never used a library, just check this out, it's a portion of a project I made some time ago:

**Test.ino:**

```arduino
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);
#include "LargeNumbers.h"

int secs = 0;

void setup()
{
  Serial.begin(115200);	// Debugging only
  initLcd();
 }

void loop()
{
  printValue(4, 4, secs++); 
  delay(1000);
}

```

**LargeNumbers.h:**

```arduino
// the 8 arrays that form each segment of the custom numbers
byte bar1[8] = 
{
        B11100,
        B11110,
        B11110,
        B11110,
        B11110,
        B11110,
        B11110,
        B11100
};
byte bar2[8] =
{
        B00111,
        B01111,
        B01111,
        B01111,
        B01111,
        B01111,
        B01111,
        B00111
};
byte bar3[8] =
{
        B11111,
        B11111,
        B00000,
        B00000,
        B00000,
        B00000,
        B11111,
        B11111
};
byte bar4[8] =
{
        B11110,
        B11100,
        B00000,
        B00000,
        B00000,
        B00000,
        B11000,
        B11100
};
byte bar5[8] =
{
        B01111,
        B00111,
        B00000,
        B00000,
        B00000,
        B00000,
        B00011,
        B00111
};
byte bar6[8] =
{
        B00000,
        B00000,
        B00000,
        B00000,
        B00000,
        B00000,
        B11111,
        B11111
};
byte bar7[8] =
{
        B00000,
        B00000,
        B00000,
        B00000,
        B00000,
        B00000,
        B00111,
        B01111
};
byte bar8[8] =
{
        B11111,
        B11111,
        B00000,
        B00000,
        B00000,
        B00000,
        B00000,
        B00000
};

void initLcd() {
  lcd.init();
  lcd.backlight();

  lcd.createChar(1,bar1);
  lcd.createChar(2,bar2);
  lcd.createChar(3,bar3);
  lcd.createChar(4,bar4);
  lcd.createChar(5,bar5);
  lcd.createChar(6,bar6);
  lcd.createChar(7,bar7);
  lcd.createChar(8,bar8);
}

// digits 0 to 9, and 10 is a space
byte custom[11][6] = {
  {2,8,1,2,6,1}, // 0
  {32,32,1,32,32,1}, // 1
  {5,3,1,2,6,6}, // 2
  {5,3,1,7,6,1}, // 3
  {2,6,1,32,32,1}, // 4
  {2,3,4,7,6,1}, // 5
  {2,3,4,2,6,1}, // 6
  {2,8,1,32,32,1}, // 7
  {2,3,1,2,6,1}, // 8
  {2,3,1,7,6,1}, // 9
  {32,32,32,32,32,32} // space
};

void printChar(char value, byte col) {
  int i = value - '0';
  if ( value == ' ' ) i = 10;
  lcd.setCursor(col, 0);
  for (int j=0; j<=5; ++j) {
    if ( j == 3 ) lcd.setCursor(col, 1); 
    lcd.write(custom[i][j]);
  }
}  

void printDot(byte col) {
  lcd.setCursor(col, 0);
  lcd.write(' ');
  lcd.setCursor(col, 1); 
  lcd.write('.');
}

char buf[6];

// Display the integer value with spaces
void printValue(byte col, int size, int v) {
  if (size > 5) size = 5;
  sprintf(buf, "%5d", v);
  for(byte c=5-size; c<=size; ++c) {
    printChar(buf[c], col);
    col += 3;
  }
}

// Display the integer value with zero padding
void printValueZ(byte col, int size, int v) {
  if (size > 5) size = 5;
  sprintf(buf, "%05d", v);
  for(byte c=5-size; c<=size; ++c) {
    printChar(buf[c], col);
    col += 3;
  }
}

```

Here is the test sketch on Wokwi:

> **[TestLCD - Wokwi ESP32, STM32, Arduino Simulator](https://wokwi.com/projects/386805270215632897)**
>
> Run IoT and embedded projects in your browser: ESP32, STM32, Arduino, Pi Pico, and more. No installation required!

---

<div class="post-metadata">

**Author:** ![drmina2023](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/drmina2023/32/1013044_2.png) [@drmina2023](https://forum.arduino.cc/u/drmina2023)\
**Post date:** [January 15, 2024, 8:16am UTC](https://forum.arduino.cc/t/big-numbers-in-arabic-font/1208825/16 "2024-01-15T08:16:16Z")

</div>

@docdoc  
@david_2018

Here is the new Link

> **[Circuit design BigNumbers of Spectacular Jarv | Tinkercad](https://www.tinkercad.com/things/lFBwwTTgeEI-bignumbers-of-spectacular-jarv?sharecode=o0vkM5rV1e3cw0X2TOXPKoU6WxbgFdbL5qykYFdcUQ4)**
>
> Circuit design BigNumbers of Spectacular Jarv

As I'm Beginner I can't Use Wokwi now.  
And here is the final code where I added Creatchar function

```arduino
#include <Adafruit_LiquidCrystal.h>
#include <Keypad.h>

const int ROW_NUM = 4; // four rows
const int COLUMN_NUM = 4; // four columns

char keys[ROW_NUM][COLUMN_NUM] = {
  {'1','2','3', 'A'},
  {'4','5','6', 'B'},
  {'7','8','9', 'C'},
  {'*','0','#', 'D'}
};

byte pin_rows[ROW_NUM] = {9, 8, 7, 6}; // connect to the row pinouts of the keypad
byte pin_column[COLUMN_NUM] = {5, 4, 3, 2}; // connect to the column pinouts of the keypad

Keypad keypad = Keypad(makeKeymap(keys), pin_rows, pin_column, ROW_NUM, COLUMN_NUM );

Adafruit_LiquidCrystal lcd_1(0);

uint8_t custChar[8][8] = {
  {31, 31, 31, 0, 0, 0, 0, 0}, // Small top line - 0
  {0, 0, 0, 0, 0, 31, 31, 31}, // Small bottom line - 1
  { B11111,
    B00000,
    B00000,
    B00000, // This shows an alternative
    B00000, // way of defining a custome character,
    B00000, // a bit more 'visually' perhaps?
    B00000,
    B11111,
  },
  //{31, 0, 0, 0, 0, 0, 0, 31}, // Small lines top and bottom -2
  {0, 0, 0, 0, 0, 0, 0, 31}, // Thin bottom line - 3
  {31, 31, 31, 31, 31, 31, 15, 7}, // Left bottom chamfer full - 4
  {28, 30, 31, 31, 31, 31, 31, 31}, // Right top chamfer full -5
  {31, 31, 31, 31, 31, 31, 30, 28}, // Right bottom chamfer full -6
  {7, 15, 31, 31, 31, 31, 31, 31}, // Left top chamfer full -7
};

// Define our numbers 0 thru 9
// 254 is blank and 255 is the "Full Block"
/*uint8_t bigNums[10][6] = {
  {1, 254, 254, 0, 254, 254}, //0
  {254, 255, 254, 254, 255, 254}, //1
  {255, 0, 0, 255, 254, 254}, //2
  {255, 3, 255, 255, 254, 254}, //3
  {7, 2, 0, 5, 3, 1}, //4
  {254, 1, 254, 4, 1, 6}, //5
  {0, 0, 5, 254, 254,255}, //6
  {255, 254, 255, 4, 1, 6}, //7
  {7, 0, 5, 255, 254, 255}, //8
  {255, 2, 5, 255, 254, 254}, //9
};*/

uint8_t bigNums[10][6] = {
  {7, 0, 5, 4, 1, 6}, //0
  {0, 5, 254, 1, 255, 1}, //1
  {0, 2, 5, 7, 3, 1}, //2
  {0, 2, 5, 1, 3, 6}, //3
  {7, 3, 255, 254, 254, 255}, //4
  {7, 2, 0, 1, 3, 6}, //5
  {7, 2, 0, 4, 3, 6}, //6
  {0, 0, 5, 254, 7, 254}, //7
  {7, 2, 5, 4, 3, 6}, //8
  {7, 2, 5, 1, 3, 6}, //9
};

void setup() {
  // Initiate the LCD:
  lcd_1.begin(16,2);
  
   // Create custom character map (8 characters only!)
 for (int cnt = 0; cnt < sizeof(custChar) / 8; cnt++) {
    lcd_1.createChar(cnt, custChar[cnt]);
  }

}
 
int cursorColumn = 0;

void printBigNum(int number, int startCol, int startRow) {

  // Position cursor to requested position (each char takes 3 cols plus a space col)
  lcd_1.setCursor(startCol, startRow);

  // Each number split over two lines, 3 chars per line. Retrieve character
  // from the main array to make working with it here a bit easier.
  uint8_t thisNumber[6];
  for (int cnt = 0; cnt < 6; cnt++) {
    thisNumber[cnt] = bigNums[number][cnt];
  }

  // First line (top half) of digit
  for (int cnt = 0; cnt < 3; cnt++) {
    lcd_1.print((char)thisNumber[cnt]);
  }

  // Now position cursor to next line at same start column for digit
  lcd_1.setCursor(startCol, startRow + 1);

  // 2nd line (bottom half)
  for (int cnt = 3; cnt < 6; cnt++) {
    lcd_1.print((char)thisNumber[cnt]);
  }
}
  
void loop(){
  char key = keypad.getKey();
  int cursorColumn = 0;
 
  if (key) {
    lcd_1.setCursor(cursorColumn,0); // move cursor to (cursorColumn, 0)
    //lcd_1.print(key); // print key at (cursorColumn, 0)
    
    printBigNum(key, cursorColumn, 0);

    
    cursorColumn+=4; // move cursor to next position
    if(cursorColumn > 16) { // if reaching
 limit, clear LCD
      lcd_1.clear();
      cursorColumn = 0;
    }
  }
}

```

It sort of working without a great result

---

<div class="post-metadata">

**Author:** ![docdoc](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/docdoc/32/220907_2.png) [@docdoc](https://forum.arduino.cc/u/docdoc)\
**Post date:** [January 15, 2024, 9:45am UTC](https://forum.arduino.cc/t/big-numbers-in-arabic-font/1208825/17 "2024-01-15T09:45:11Z")

</div>

> [@drmina2023](#):
>
> As I'm Beginner I can't Use Wokwi now.

Why? Wokwi isn't any hard to use, not more than Tinkercad...  
Aynway, why don't you try my test code, even on Tinkercad?  
Ok, this is my test code, on Tinkercad (just a couple of minutes to change the project...):

> **[Circuit design Test LCD I2C | Tinkercad](https://www.tinkercad.com/things/blYShZhPSNZ-test-lcd-i2c?sharecode=RtKYJF-Afewbt5sfhmhjVrXZKwoVsgvSDQKJivB2neo)**
>
> Circuit design Test LCD I2C

---

<div class="post-metadata">

**Author:** ![drmina2023](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/drmina2023/32/1013044_2.png) [@drmina2023](https://forum.arduino.cc/u/drmina2023)\
**Post date:** [January 15, 2024, 10:54am UTC](https://forum.arduino.cc/t/big-numbers-in-arabic-font/1208825/18 "2024-01-15T10:54:34Z")

</div>

@docdoc  
I really appreciate your help ,  
but please, what is the role of the following functions as I can't find any use for them.  
void printValueZ  
printChar  
printDot  
if possible could you give example using those functions .

---

<div class="post-metadata">

**Author:** ![docdoc](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/docdoc/32/220907_2.png) [@docdoc](https://forum.arduino.cc/u/docdoc)\
**Post date:** [January 15, 2024, 11:07am UTC](https://forum.arduino.cc/t/big-numbers-in-arabic-font/1208825/19 "2024-01-15T11:07:16Z")

</div>

Look at my "Largenumbers.h" I posted before, there are some comments.  
For instance, printValue and printValueZ are defined as:

```arduino
// Display the integer value with spaces
void printValue(byte col, int size, int v) {
...
// Display the integer value with zero padding
void printValueZ(byte col, int size, int v) {

```

I suppose you mean you want to know parameters usage...

- "col" is the LCD column to start with (0-15, but as large numbers are 3 cols wide, it should go from 0 to 12)
- "size" is the number of characters to be printed (from 1 to 5 because a 16 chars display can show up to 5 digits 3 chars wide)
- "v" is the integer value to be printed

So a "`printValue(0, 3, 80)`" prints " 80" (with a leading space) at column 0 (on columns 0 to 2), while a "`printValueZ(0, 3, 80)`" prints "080".

"printChar" is a sub-function used by "printValue" and "printValueZ" to print a single char. Anyway you can use it to print single characters. Example, a "`printChar('4', 0)`" will print a large zero "4" digit at column 0.  
"printDot" is a function not used here, but prints just a small dot. It will come to hand if you plan to extend the functions to print decimal dot for float values. Just as a hint, a "printValueF" to print float numbers could be something like this:

```arduino
void printValueF(byte col, float v) {
  dtostrf(v, 4, 2, buf);
  for(byte c=0; c<4; ++c) {
    if ( buf[c] == '.' ) {
      printDot(col);
      ++col;
    } else {
      printChar(buf[c], col);
      col += 3;
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![drmina2023](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/drmina2023/32/1013044_2.png) [@drmina2023](https://forum.arduino.cc/u/drmina2023)\
**Post date:** [January 16, 2024, 7:30am UTC](https://forum.arduino.cc/t/big-numbers-in-arabic-font/1208825/21 "2024-01-16T07:30:18Z")

</div>

Your code is awesome, I'm sure I can tinker it and I will give you feedback

[Next page](https://forum.arduino.cc/t/big-numbers-in-arabic-font/1208825.md?page=2)
