PyRaspBeta

← All practice problems

Raspberry Pi practice problem · Displays

Progress bar

MediumBudget $12Python · gpiozero

A 16×2 I²C LCD (0x27, SDA/SCL, 5 V) shows a fake download. The progress p starts at 0 % and rises by 10 % every second (10 % at 1 s, 20 % at 2 s…) until it reaches 100 % at 10 s, where it stays.

  • line 1: Loading {p}% (Loading 0%, Loading 30%, Loading 100%)
  • line 2: a bar of # characters, p × 16 // 100 of them (none at 0 %, all 16 at 100 %)

More in Displays