Often I see example sketches of a steppermotor controlled by an Arduino UNO.
Most of the lines in such sketch seems to me applicable for different Arduino types,
exept for one line:
If we are talking about pin numbers then it does not work one to one with a nano.
Pin 8...11 (nano) = D5...D8
If I use D8...D11 = Pin 11...14 of the Nano then the steppermotor (28BYJ-48) comes to live.
There is one remark: The wires to Pin 12 and pin 13 had to be reversed. That will result in D8, D10, D9 and D11 resp. That order is also used in an example using this link: Interfacing ULN2003 Stepper Motor Driver with Arduino - Electropeak