Changing the speed of a brushless motor

I need to change the speed of a brushless motor A2212/15T 930KV while using servo.h library and by keeping the motor running continuously. I'm using a PID controller so the value of the motor needs to be updated. is this sketch part will work normally:

actualspeedservo = servo.read();
servo.write(actualspeedservo += c); //c being a command being calculated each iteration to adjust the position

and what is the range of speed that can be put from minimum to maximum speed when using the function:

servo.write(value);

PS: I'm using it to control 4 brushless motors simultaneously in a quadcopter.

The servo.read() function will just return the last value written with servo.write() there is no feedback from the speed controller.

What type of speed controllers are you using? Most will have no rpm feedback to get the speed from.
more importantly .. what type of IMU are you using?

The actual speed of the motors when trying to achieve stability with a quadcopter is going to vary based on the input from a gyroscope / accelerometer combo or IMU. The controller will change the power of the motor to maintain level flight, Knowing the actual speed in RPM of the motor does not make a difference.

In fact if you were to take 4 motors and run them at the exact same speed in a quad setup, it would very quickly lose stability and flip in any real world scenario. Its the gyro/accel and PID loop control based on that input that will keep it steady.

servo.write() will take a range from 0 to 180. This will take your motor from 0 to full power. The speed cannot be set by the value written, just the power. Actual speed will vary with load.

nice motors BTW, should be able to make a screaming fast quad with those.

You can get ESCs that are programmed different and control speed rather than power.
For quadcopters standard ESCs are too slow to respond and won't be very good, you need
ESCs tuned for multirotor craft, not a model plane.

MarkT:
You can get ESCs that are programmed different and control speed rather than power.
For quadcopters standard ESCs are too slow to respond and won't be very good, you need
ESCs tuned for multirotor craft, not a model plane.

Oh that's right, esc's flashed with BLHeli firmware can do a closed loop speed control. Its not really used so much for multirotors though. It is used for variable pitch rotors on helicopters.

Most esc's will be suitable for mutirotor. Some may need to be re-flashed with a different firmware. Looking at hobbykings current esc's just about all are suitable for mutirotors in the 20-30 amp range. Simonk or BLheli based firmwares are the norm now. Some manufacturers still have completely custom firmware that might not be suitable but you can re-flash most of these with one of the above.