Skip to content
Arudino library for displaying Icelandic characters on a LCD
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.

StafirLCD - Arduino library

Arudino library for displaying Icelandic characters on a Liquid Crystal Display(LCD).

You can display up to 8 custom created characters on a LCD display. Using that I was able to draw all the Icelandic characters and make this library to allow us to display them on a LCD screen.

The constructor - StafirLCD

When using the StafirLCD library you will need to tell it which LCD to use.
You do that by passing the address of the LiquidCrystal_I2C object you intend to use with the StafirLCD library. That is, you will need to create the LiquidCrystal_I2C object and the pass it to the stafirLCD constructor.


Use this function to specify which Icelandic characters you will be using on the following screen. This function needs to be called before you use the setCursor function on LiquidCrystal_I2C object. It is properly best to call it right after you clear the screen. This function will save the characters you specify to memory on the Arduino and refer the LCD you are using to use that memory.

You can set 2, 4 or 8 characters at a time with this function If you want to change a characters already stored in memory or add a characters to a memory at a specific location (0-7) you can do so with the function

  • useChar(byte address, int chStafur)


Use this function to print text or Icelandic characters to the LCD screen. See the example below


I am using a I2C, a four wire connection to my LCD. The library does not care about the connection you are using, it just needs a reference to the LiquidCrystal_I2C object.

Let’s display this sentence on 16 column and 2 lines LCD.

  • Móðurmál mitt íslenska á fljótandi Kristal skjá.
#include <StafirLCD.h>
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);

StafirLCD stafir(&lcd);

void setup() {
 stafir.useChars('ó', 'ð', 'á', 'í');

void loop() {
 //  Móðurmál mitt 
 //    Íslenska
  stafir.print('ó', 'ð');
  stafir.print("urm",'á', "l mitt");
  stafir.print('í', "slenska");
  //  á fljótandi   
  // Kristal skjá. 
  stafir.print('á'," flj",'ó',"tandi");
   stafir.print("kristal skj",'á',"."); 

Ég vona að þú getir notað þetta. Go Arduino :)

You can’t perform that action at this time.