Welcome to myCobot 320 Arm repository
6.Use of adaptive grippers
Use of adaptive grippers
C# API Usage Instructions
SetGripperMode(byte mode) Function: Set the crawl mode Return value: None Parameter description: Parameter 1: Mode: 1-transparent mode, 0-IO mode
setGripperValue(byte angle, byte speed) Function: Controlling the adaptive gripper Return value: None Parameter description: Parameter 1: Gripper opening and closing angle (0-100, 0--closed, 100-open maximum angle), Parameter 2: Gripper opening and closing speed (0-100)
getGripperValue() Function: Get the adaptive gripper angle Return value: int type, returns the gripper angle (0--closed, 100-open maximum angle) Parameter Description: None
Use Cases
setGripperValue()
xusing System;using System.Threading;namespace Mycobot.csharp{class Test{static void Main(string[] args){MyCobot mc = new MyCobot("COM57");//Raspberry Pi robotic arm serial port name: /dev/ttyAMA0mc.Open();Thread.Sleep(5000);//After Windows opens the serial port, you need to wait for 5 seconds, and the basic button at the bottom of Windows will restart when it opens the serial port.mc.SetGripperMode(0);//Transparent transmissionThread.Sleep(1000);mc.setGripperValue(0,10)mc.Close();}}}
getGripperValue()
xusing System;using System.Threading;namespace Mycobot.csharp{class Test{static void Main(string[] args){MyCobot mc = new MyCobot("COM57");//Raspberry Pi robotic arm serial port name: /dev/ttyAMA0mc.Open();Thread.Sleep(5000);//After Windows opens the serial port, you need to wait for 5 seconds, and the basic button at the bottom of Windows will restart when it opens the serial port.mc.SetGripperMode(0);//Transparent transmissionThread.Sleep(1000);int num = mc.getGripperValue();mc.Close();}}}