Switching between LCD displays with a custom characters animation of blinking

I'm designing an animated face for my LCD that blinks it's eyes as the main state, and when the button is pressed it will change to readings being taken in by a soil humidity sensor. If the soil humidity goes above a certain threshold the expression will then change to the "loveface" expression.

I have the soil sensor working fine in another batch of code, however swapping between the custom char function that allows the animation to blink and the second "loveface" expression is my goal for now before I sub in all of the soil reading code (trying to keep it simple).

lcd.clear() doesn't work, I've a feeling it's something to do with break(); , however I've been having difficulty finding this.

I just want it to go from one expression to the other if anyone could help me with that here. And if anyone knows of any resources to help me with the next step of latching a button to switch between the faces that would be amazing! I'm very new to coding on my own, so any help is very appreciated.

Thanks in advance!

LCD_Custom_Char.ino (2.69 KB)

If you initialise a custom character, display it and then change the definition of the same character then the new one will automatically be displayed in its place, you do not have to print the character again.

help me with the next step of latching a button

For a latching button look into the state change detection tutorial.

There are eight custom character slots available. How many unique characters does your animation need?

dempseytadhg:
If the soil humidity goes above a certain threshold the expression will then change to the "loveface" expression.

Really? When it gets wet, you get a "loveface"? Really?

-jim lee

I see no "blink" and no break in your sketch.

Imho you need two things:

something like the IDE example "BlinkWithoutDelay" to switch between two states, and print the one or the other character

Read a button based on the ide example "Debounce" to switch from one animation to the next