The 86Duino IDE has added this library since Coding 209. In addition to being fully backward compatible with the existing Servo library of Arduino/86Duino, many new functions have been added to make it easier for players to operate RC servo-based robots (e.g., player-type bipedal robots and six-legged robotic beasts). With the Servo86 library, users can:
- Specify single servo angle and speed and set multiple servos to operate at the same time.
- All servo angles of robot can be saved as a single action frame (frame), and you can freely decide the time interval of action frame playback to reproduce or record robot’s action.
The Servo86 library also improves the PWM jitter of the Arduino Servo library, as described in this article.
With the Servo86 library, we have created a robot motion editor: 86ME (86Duino Motion Editor), which allows you to edit robot motion frames and automatically generate sketch code to call the Servo86 library.
Servo86 Categories
Servo Class
This category provides all the functions of the Servo category of the old Servo library of Arduino/86Duino and adds more advanced functions to control the servo motion flow and rotation speed.
- Servo
- attach()
- attached()
- write()
- writeMicroseconds()
- read()
- readMicroseconds()
- setOffset()
- setVelocity()
- setPosition()
- setRealTimeMixing()
- run()
- pause()
- resume()
- stop()
- release()
- isMoving()
- angleMap()
- detach()
Multi-servo synchronous action function
The following functions are batch processing functions for servos, which can control the simultaneous operation of any specified number of servos.
ServoFrame Class
Many commercially available robot motion editing software use the concept of Key Frame in the field of computer animation to represent robot motion, and a robot pose, that is, a list of the positions of the servos on the robot, is called a Frame. The Servo86 library provides the ServoFrame category to support the concept of controlling the robot motion with motion frames, and this category can also load and generate the robot motion frame file exclusively for the Servo86 library.
Users can not only use the save() function of ServoFrame to generate action frame files directly but also use 86ME robot action editor to edit and generate action frame files. After that, you can load the action frame file into the program by using the load() function of ServoFrame.
ServoFramePololu Class
This is a derivative of ServoFrame, which supports reading robot motion files generated by Pololu‘s motion editor Maestro Control Center to generate robot motion frames for use with the Servo86 library.
ServoFrameKondo Class
This is a derivative of ServoFrame, which supports reading robot motion files generated by KONOD‘s motion editor HeartToHeart3 to generate robot motion frames that can be used by the Servo86 library; in addition, it also provides a special function to capture the current position of KONDO servo in real time.
ServoFrameInno Class
This is a derivative of ServoFrame, which supports reading robot motion files generated by Innovati‘s motion editor to generate robot motion frames for use in the Servo86 library.
ServoFrameVstone Class
This is a derivative of ServoFrame, which supports reading robot action files generated by Vstone‘s action editor RobovieMaker2 to generate robot action frames for use with the Servo86 library. (This category is supported by 86Duino Coding 300.)
Multi-motion frame motion smoothing function
Starting with the 86Duino Coding 300, the Servo86 library supports the Cubic Spline motion path interpolation method, which enables smoother motion panning between successive frames and reduces the vibration of the joint mechanism. The following functions can enable this smooth interpolation function for continuous motion frames:
ServoOffset Class
The Servo86 library supports fine-tuning the servo center offset to compensate for such errors, so that each servo can be aligned precisely. This category can be used to define, save, and load the Servo86 library with the servo center offset fine adjustment value (Offset).
ServoOffsetKondo Class
A derivative of ServoOffset, it supports reading offset fine adjustment values from robot motion files generated by KONOD‘s motion editor HeartToHeart3 and providing them to the Servo86 library to compensate for servo center position errors.
ServoOffsetInno Class
A derivative of ServoOffset, it supports reading the offset fine adjustment value file generated by Innovati‘s motion editor and providing it to the Servo86 library to compensate for the servo center position error.
ServoOffsetVstone Class
A derivative of ServoOffset that supports reading offset fine tuning values from the motion profiles generated by Vstone‘s motion editor RobovieMaker2 and providing them to the Servo86 library to compensate for servo center position errors. (This category is supported from 86Duino Coding 300.)
Usage restrictions
The TimerOne library and the Servo library also use the timer. Therefore, to avoid conflicts between the libraries, only one of these three libraries can be used at a time.
86ME Motion Editor
86ME (86Duino Motion Editor) is an open source robot motion editor that can edit robot motion like animation, support generating robot motion frame files that can be loaded by ServoFrame, and can automatically generate robot motion programs that can be directly burned to 86Duino. Please refer to the 86ME user manual for details.
Demo Video
Libraries Reference Home
The text of the 86Duino reference is a modification of the Arduino reference and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.