$4 = 0 should be the correct setting. Check your $1 setting and at least for testing set $1=255. This will keep the drives enabled all the time. Also, the A4988 requires a separate logic voltage in addition to the power supply for the motors. VDD and GND are the pins on the A4988 that need about 5V for logic power. This can come from the same power supply running the arduino, but it needs to be there.