0

I have 20x4 LCD, and I am using the LiquidCrystal_I2C library to communicate with the screen via Arduino.

I want to build a menu with that screen, and I want to illustrate the "currentHover" option.

For example:

enter image description here

If it is not possible, I would love to get other ideas.

JRE
  • 67,678
  • 8
  • 104
  • 179
Itzik.B
  • 103
  • 2
  • You could possibly invert the text colors - so instead of light text on a dark background you'd put dark text on a light background. Depends on if your LCD supports this. – brhans Jul 30 '20 at 11:27

3 Answers3

4

No, it is not possible.

You must use something else, like the blinking or static cursor, or existing characters, or custom characters to indicate the line somehow.

Justme
  • 127,425
  • 3
  • 97
  • 261
  • in which type of screens is this possible? – Itzik.B Jul 30 '20 at 09:26
  • 1
    @itzikb It is possible with LCD *graphics* displays, not regular LCD *character* displays. A search on mouser/digikey will get you want you want: [example](https://www.mouser.fr/Optoelectronics/Displays/LCD-Displays/LCD-Graphic-Display-Modules-Accessories/_/N-6j73a). – dim Jul 30 '20 at 09:34
1

Yes you can draw lines with custom characters, for example the letter "L" will be something like this:

and blank obviously should look like this:

This useful github link will help you to build your custom 16x2 LCD characters with graphical interface and guide on how to use it, link.

ElectronSurf
  • 2,185
  • 3
  • 24
  • 61
  • There are only 8 custom characters, so you can't have a line with 20 characters of arbitrary text that has lines applied over it. – Justme Jul 30 '20 at 11:46
  • @Justme There's no limit for custom characters, is it written somewhere? – ElectronSurf Jul 30 '20 at 15:26
  • 1
    There is a limit. It's written in the LCD controller datasheet. You only have 64 addresses for loading font data, which is enough for eight characters that uses eight bytes per character, one byte for each line. – Justme Jul 30 '20 at 15:33
  • @Justme I did more research and you're right, there's a limit.yet it's possible to have at least 8 character. and can repeat the blank ones. – ElectronSurf Jul 30 '20 at 16:29
  • exactly 8 custom characters at a time. And to superimpose these lines on top of existing letters, you need to have a clone of the original font in your MCU as it cannot be read out from the LCD. And if you change LCD to a different one, it might have a different font. And you can't know the font. And cloning the font data could be a copyright issue. – Justme Jul 30 '20 at 16:53
0

You might be able to use an underscore character and alternate it with your text very quickly, probably no delay at all between changing between your character and the underscore, and it may appear as an underlined character to the eye. However, you won't be able to generate an unbroken line like you drew because I believe each character space is not contiguous to the next.

David
  • 302
  • 1
  • 8