[SOLVED] How to createChar with items inside an array

Please, i’ve looked around the forum but no found solution to my problem, someone can help me to create the character with items inside an array.

“a” is 1 to 16 and I want to build a character (5x8) within the array “alines” in position “a” to “+7”.

thank you

#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 9, 8, 7, 6, 5, 4, 3, 2);
byte alines[ ] = {
  B10000, B11000, B10100, B10010, B10001, B10000,
  B11000, B11111, B11010, B11001, B11000, B11000,
  B11100, B11010, B11001, B11111, B11111, B11101,
  B11100, B11100, B11100, B11110, B11101,};
long a = 0;
void setup() 
{
  lcd.begin(16, 2);
}
void loop()
{
  lcd.createChar(1, a to a +7); /// NEED CREATECHEAR with 8 BYTEs of "alines" from A to A + 7
  lcd.setCursor(0, 0);
  lcd.write(1);
  delay(300);
  a = a + 1;
  if ( a > 17 ) { a = 1 ;}
}

lcd.createChar(num, data)
num: which character to create (0 to 7)
data: the character's pixel data

"each custom character is specified by an array of eight bytes, one for each row."

To specify the 8 bytes starting at index 'a' use:

lcd.createChar(1, &alines[a]);

Don't worry about the "a+7". The createChar() function knows how to count to 7.

You can also write it this way:

lcd.createChar(1, alines+a);

Solved.

Thanks