LCD Graphics, 20x4 i2c

Hi guys, spending some quality time making a cannabis leaf piece of code. Sadly, after the last couple of characters, something is going wrong. I'm unsure how to understand it, as nothing for the next characters has changed.

Any advice please guys :slight_smile:

#include <LiquidCrystal_I2C.h>

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


byte j1[8] = {
  0b00000,
  0b00001,
  0b00001,
  0b00011,
  0b00011,
  0b00011,
  0b00111,
  0b00111
};

byte k1[8] = {
  0b00000,
  0b10000,
  0b10000,
  0b11000,
  0b11000,
  0b11000,
  0b11100,
  0b11100
};

byte g2[8] = {
  0b00001,
  0b00000,
  0b00000,
  0b00000,
  0b00000,
  0b00000,
  0b00000,
  0b00000
};

byte h2[8] = {
  0b11000,
  0b11111,
  0b11111,
  0b01111,
  0b01111,
  0b00111,
  0b00111,
  0b00011
};

byte i2[8] = {
  0b00000,
  0b00000,
  0b00000,
  0b10000,
  0b11000,
  0b11100,
  0b11100,
  0b11110
};

byte j2[8] = {
  0b00111,
  0b00111,
  0b00111,
  0b00111,
  0b00111,
  0b00111,
  0b00111,
  0b00111
};

byte k2[8] = {
  0b11100,
  0b11100,
  0b11100,
  0b11100,
  0b11100,
  0b11100,
  0b11100,
  0b11100
};

byte l2[8] = {
  0b00000,
  0b00000,
  0b00000,
  0b00001,
  0b00011,
  0b00111,
  0b00111,
  0b01111
};

byte m3[8] = {
  0b00000,
  0b00000,
  0b00000,
  0b00001,
  0b00011,
  0b00111,
  0b00111,
  0b01111
};



void setup() {

lcd.begin(20,4);

lcd.clear();


lcd.createChar(0, j1);
lcd.createChar(1, k1);
lcd.createChar(2, g2);
lcd.createChar(3, h2);
lcd.createChar(4, i2);
lcd.createChar(5, j2);
lcd.createChar(6, k2);
lcd.createChar(7, l2);
lcd.createChar(8, m3);
//lcd.createChar(0, n2);


lcd.setCursor(9,0);
lcd.write(byte(0));

lcd.setCursor(10,0);
lcd.write(byte(1));

lcd.setCursor(6,1);
lcd.write(byte(2));

lcd.setCursor(7,1);
lcd.write(byte(3));

lcd.setCursor(8,1);
lcd.write(byte(4));

lcd.setCursor(9,1);
lcd.write(byte(5));

lcd.setCursor(10,1);
lcd.write(byte(6));

lcd.setCursor(11,1);
lcd.write(byte(7));

lcd.setCursor(12,1);
lcd.write(byte(8));



}

void loop() {}

(deleted)

You can declare only 8 custom chars. But in your draw you need more than this. I think that is not possible to print this. Perhaps you need another kind of display.

Pablo_Lucini:
You can declare only 8 custom chars.

Exactly.

The custom characters 8-15 are the same as 0-7.
i.e. custom character 8 is the same as custom character 0, custom character 9 same as 1, etc...