Arduino lcd showing the same custom characters

i made a project that shows custom smile character then one with an unibrow but it shows the same character. Any ideas to fix it?

yes, put that thing over that thing and pull this thing then turn over and you’re done

What?

put that thing over that thing and pull this thing then turn over and you’re done

I don't get it!

You asked a foolish question. You got a foolish answer.

Try asking your question again, but this time in a way that we have more than zero chance to help you.

ok. I tried showing two custom characters but it shows the first. do you know why?

Ok, I can easily answer that question. No, I do not know why. I also do not know what colour of socks you are wearing today.

2 Likes
  1. i don't wear socks.
  2. maybe it's because of byte address being the same???
  1. How could I possibly know that you are wearing no socks? Do you know if I am wearing socks, or what colour they are? Of course you don't know. I have not told you.
  2. Maybe.

maybe you can at least tell us what lcd you are using, what kind of arduino and show your code?

Arduino uno, 1602A, The Code

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // RS, E, D4, D5, D6, D7
byte NormalSmile[] = {
  B00000,
  B00000,
  B01010,
  B00000,
  B10001,
  B01110,
  B00000,
  B00000
};

byte MehdiSmile[] = {
  B11111,
  B00000,
  B01010,
  B00000,
  B10001,
  B01110,
  B00000,
  B00000
};

void setup() {
  lcd.begin(16, 2);
  lcd.write((byte)0x00);
  lcd.createChar(0, MehdiSmile);
  lcd.setCursor(0,0);
  lcd.write((byte)NULL);
  lcd.createChar(0,NormalSmile);
  lcd.setCursor(1,0);
  lcd.write((byte)NULL);
}

void loop() { }

Please reread the examples to lcd about the creating custom characters.

You put your two custom characters to the same place (address 0) in LCD memory, so the first (MehdiSmile) will be rewrited by second - NormalSmile

so it's lcd.createChar(1,MehdiSmile);?
Addition: it shows the MehdiSmile for two chars

I don't know exactly the value of the address should be used, but anyway, the address can't be same

fixed it. How? i just changed lcd.write((byte)null); to lcd.write((byte) 0x01);

That's great! Now can you see why no one could help you from your first question?

1 Like

yeah. i'll be more specific later. Thanks! :smile:

that is just 0

do you change the address in second createChar() call before or just change lcd.write() ?
please show your revised code