Hi I'm programming arudino lcd.
I make print custom char program. Here it is.
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int cmd = 0;
byte a_1[8] = {
B00000,
B00000,
B00000,
B00000,
B00000,
B00000,
B00000,
};
byte a_2[8] = {
B00000,
B10001,
B00000,
B00000,
B10001,
B01110,
B00000,
};
void korean(int i)
{
if(i==1)
{
byte a_1[8] = {
B10101,
B11101,
B10101,
B11101,
B00000,
B01110,
B01110,
};
cmd = 1;
}
else
{
byte a_1[8] = {
B00000,
B00000,
B00000,
B00000,
B00000,
B00000,
B00000,
};
}
}
void setup() {
Serial.begin(115200);
korean(1);
lcd.createChar(0, a_1);
lcd.begin(16, 2);
lcd.write(byte(0));
}
void loop() {
}
I want to substitute byte type Variable in function. But it can't.
How to substitute character value into byte type variable in function?