Why I need to use write() in here

instead of use raw my_servo(pos)


my_servo is the name of your servo object
write() is a function in the Servo library that moves the specified servo to the position given
Hence my_servo.write(pos);

side note: please, please never ever again post pictures of text... Not only they are not readable nor usable directly for copy&paste but they use up lots of storage and internet bandwidth which contributes to polluting the planet.

➜ do your part and do yourself a favour and please read How to get the best out of this forum


you can see the public API for the Servo class in its .h file

Show us the sketch to do so.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.