In the previous article, we established the motivation for building a garage door opener using the Raspberry Pi along with a handful of other components. More specifically, we outlined the desired features of the opener, which includes the ability to monitor and control the door through a website. In this installment of the series, we’ll focus on the features and how they can be implemented in the Raspberry Pi. We’ll use a state machine to keep track of the garage door.
The state machine below, described using a classic “stick and bubble” notation, provides a very simple approach to describing the states of the door. Basically, the door is either open, closed or somewhere between.