I am working on building a quadcopter with an Arduino nano. I am currently only working with 2 motors. However, I am experiencing an odd issue. When I try to run my motors, one of them runs fine, while the other stutters - it turns on and off extremely quickly to get this stuttering effect, all the while emitting a quick beeping sound. I know the motor and the ESC are both perfectly fine because when I isolate the problematic motor and run it without the Arduino using a Servo consistency master, it works perfectly normally. It also cannot be the signal pin pf the Arduino which the motor is attached to because I switched the signal pins of the two motors, but the issue still persists with the same motor. I'd really appreciate some help, thanks!
If you ran the setup with servo tester, connection between motor and ESC is fine. Therefore, check with oscilloscope if your Arduino generates proper signal. Typically, ESCs proper input is 50Hz PWM with 1000-2000us duty. Ensure, that you have these values correctly. Moreover, ensure that high and low voltage levels are correct - 5V/3.3V (depending on Arduino version) for the high state and 0V for the low state.
If you have your PWM generated by the software you created, the signal will not be consistent and may cause some problems. I'd rather use hardware timer set to generate PWM signal. Also, if you use 8-bit timer, resolution of the output PWM signal will not be good: 20ms period divided by 256 is 0.07ms. The signal you want to generate has a duty between 1 and 2ms, therefore this 1 millisecond used for control is divided in 13 possible positions. Use 16-bit timer instead, to get better results.
The problem with one particular motor can also be caused by tolerance between ESCs; ie. you generate with your Arduino signal, that has slightly low frequency (like, 49Hz) and one of the ESCs gets it and works correctly, the other however does not "understand" the signal you generate. That is why you should precisely check PWM's frequency, duty cycle and voltages. Also mind the timers I mentioned above.
Lastly, your question is more related to the Arduino, than robotics. There is an Arduino Stack Exchange with far superior number of visitors and Arduino programmers/designers.