LCD1602 with Raspberry Pi 5 - Is there a scrolling marquee function?

Hello all,

I am very new to all of this. It’s been great fun so far. I have a Raspberry Pi 5 and the SunFounder Raphael kit. I am curious if there is a scrolling marquee function for the LCD1502 as on beginning to learn about it, I though it could be a fun addition to my long term automation project for my bedroom. If any of you know how this might be done, I would really appreciate the info.

Also, I would like to do some of the development from my user folder so that I can integrate some actions from GPIOzero into the final project, but I don’t know how to point Python in the right direction to bring GPIOzero and the Raphael kit together.

Again, any information would be very helpful and greatly appreciated.

You can try writing your own scrolling display code. Here’s an idea:

def circular_scroll(messages, delay=0.3):
    """
    Circularly scroll through multiple messages
    messages: list of messages, e.g., ["Temperature: 22C", "Motion detected", "Good night"]
    """
    while True:  # Infinite loop, you can use a variable to control stopping
        for msg in messages:
            # Clear screen
            clear()
            # Display message (if length <= 16 characters, show statically)
            if len(msg) <= 16:
                write(0, 0, msg)
                time.sleep(2)  # Static display for 2 seconds
            else:
                # Scroll long messages
                scroll_text_simple(msg, row=0, delay=delay, steps=len(msg) + 16)
            time.sleep(0.5)

# Usage example - your bedroom automation messages
messages = [
    "Welcome to bedroom!", 
    "Current time: 22:30",
    "Motion detected at door",
    "Good night, sleep well!"
]
circular_scroll(messages)

Additionally, the Raphael Kit does work with GPIO Zero. You can learn more here: