Go Down

Topic: special characters (Read 183 times) previous topic - next topic

lookaz

Aug 11, 2015, 04:09 am Last Edit: Aug 11, 2015, 05:48 am by lookaz
Hi
i was looking for how to display a special character on the LCD, then i found this topic :

https://www.arduino.cc/en/Reference/LiquidCrystalCreateChar

i want to ask how can i get the declaration of other characters as he declared smiley as follow in his code:

i hope someone can help...thx

Code: [Select]
[byte smiley[8] = {
 B00000,
 B10001,
 B00000,
 B00000,
 B10001,
 B01110,
 B00000,
};]

Paul__B

If you post it marked as "code", it is easier to visualise.

Code: [Select]
byte smiley[8] = {
  B00000,
  B10001,
  B00000,
  B00000,
  B10001,
  B01110,
  B00000,
};

Just replicate it with cut-and-paste and alter the 1s and 0s to produce your pattern.

lookaz

done, i'm actually new for using the forum, whatever thank
i hope next reply contains an answer :D

Paul__B

I'm not sure what further information you need.

MAS3

#4
Aug 11, 2015, 10:46 pm Last Edit: Aug 11, 2015, 10:48 pm by MAS3
Have another look at that.
The ones are a dot, the zeros are a blank.
Code: [Select]
byte smileySad[8] = {
  B00000,
  B10001,
  B00000,
  B00000,
  B01110,
  B10001,
  B00000,
};


That's a different smiley.
Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

HazardsMind

#5
Aug 12, 2015, 01:01 am Last Edit: Aug 12, 2015, 01:03 am by HazardsMind
This is your canvas, a 8x5 bit array.
(Zeros do not get printed on the display, only where there is a 1)
Code: [Select]
byte smileySad[8] = {
  B00000,
  B10001,
  B00000,
  B00000,
  B01110,
  B10001,
  B00000,
};


You can make whatever you want but you can only have a total of 8 special characters, so keep this in mind.


Also making one, displaying it then making another using the same address, does not allow you to keep the old one on screen. This is because you are not using the arduino's memory to save these characters, you are using the display's internal memory. So even if you draw a character on screen then move the cursor and write over it with another character, the old one will change too.
My GitHub:
https://github.com/AndrewMascolo?tab=repositories

lookaz

actually what i need to know is the 8x5 bit array representation of other special characters so that i can use different special character with my LCD

Paul__B

And that is what has been explained to you - how to draw the character into the array.

lookaz

#8
Aug 13, 2015, 06:47 am Last Edit: Aug 13, 2015, 06:48 am by lookaz
i understood, sry my english is not good enough i was keep trying to understand, whatever i got it .. thx

Go Up