PyRaspBeta

← All practice problems

Raspberry Pi practice problem · Buttons & input

Two-hand start

EasyBudget $4Python · gpiozero

Presses and guillotines use a two-hand control: the machine runs only while both buttons are held, so no hand is in the way.

Buttons on GPIO5 and GPIO6 (both to ground) and an LED on GPIO17. The LED is on only while both buttons are held.

The test holds the GPIO5 button alone (1.0–2.0 s), then the GPIO6 button alone (2.5–3.5 s), then both together: GPIO5 from 4.0 to 5.5 s and GPIO6 from 4.5 to 5.0 s.

More in Buttons & input