Steppermotor Nema17 Homing AccelStepper

sambaluniek:
(I will measure how many amps the stepper takes)

That is not easy to do - you would probably need an oscilloscope.

Be VERY CAREFUL never to disconnect the wires between the motor and the stepper driver while the driver is powered up. The driver will be instantly destroyed,

...R