PyRaspBeta

← All practice problems

Raspberry Pi practice problem · Displays

Marquee

MediumBudget $12Python · gpiozero

A 16×2 I²C LCD (0x27, SDA/SCL, 5 V). Scroll Welcome to PyRasp from right to left across the first line, like a marquee:

  • pad the message with 16 spaces on both sides: padded = " " * 16 + "Welcome to PyRasp" + " " * 16
  • frame k shows padded[k:k + 16] on line 1; frame k appears at k × 0.5 s (frame 0 at the start)
  • after the last frame, start again from frame 0. Line 2 stays empty.

The test reads frames 4, 16 and 22.

More in Displays