Raspberry Pi practice problem · Displays
Scoreboard
MediumBudget $14Python · gpiozero
A 16×2 I²C LCD (0x27, SDA/SCL, 5 V), a Home button on GPIO17 and an Away button on GPIO27 (each to GND; use the Pi's pull-ups). Each press scores one point for that team.
- line 1:
Home {h} - {a} Away(startsHome 0 - 0 Away) - the first team to reach 3 wins: line 2 shows
Home wins!orAway wins!and further presses are ignored
The test presses Home at 1 s, Away at 2 s, Home at 3 s and 4 s, then Away at 5 s.