patch says to use driver a4988
pdf diagram shows how to connect driver a4988 (2 pins)
however,
ino code says it is ment for direct control of the motor (4 pins)
so it this contribution for 2pins+driver or 4pins+direct control ?
i never tried this contribution, but from what i see it is indeed confusing. it is like you assumed: when using a driver chip like the one mentioned, 2 pins should suffice. only when controlling the motor directly you need 4 pins.
i’d also have a look at this library (instead of the standard stepper lib): AccelStepper: AccelStepper library for Arduino
it’s quite sophisticated with its accelleration behaviour and works in all possible configurations (directly (4 pins) or with driver (2pin)).