Hi,
when I was starting with arduino and stepper motors, I had an issue with noise / whistle from stepper motor, when he stopped.
I googled a solution, but did not find any.
In case you have this issue, I can recemend to use any stepper motor driver with sleep or enable pins, such as EasyDriver etc.
I simply connecten Enable pin to one of arduinos digital outputs and put HIGH level to it when motor is stopped. Before any command to EasyDriver i put LOW level to the pin.
Works very well.
#define STEPPER_PIN_sleep 8
void setup() {
..
digitalWrite(STEPPER_PIN_sleep, HIGH); //shut up the motor
}// setup
..
void some-function() {
digitalWrite(STEPPER_PIN_sleep, LOW); //wake up the driver
.. some code for the motor
digitalWrite(STEPPER_PIN_sleep, HIGH); //shut up the motor when function for motor spin is done
}// some-function