The Raspberry Pi provides general purpose digital input/output pins (called GPIO pins) that you can use for reading digital logic signals or for outputting digital logic levels. The outputs do not have much current capability, but you can drive LEDs or …