I have started a small project where I am controlling the Dobot Magician with an Arduino Mega. Movements are all going well, mainly based on the demo program provided by Dobot. However, I can’t figure out how to (de)activate/open/close the gripper with the arduino.
I am not a very experienced programmer and I am having trouble creating working code based on the communication protocol manual.
Does anyone have ready to use arduino code for controlling the gripper?
Meanwhile I have figured out a workaroud. This might be the actual solution, but I was expecting seperate commands for opening and closing the gripper. The issue can be resolved by just using the gripper command to open the gripper (end effector blows compressed air) and the suction cup command to close it (end effector pulls vacuum).
SetEndEffectorSuctionCup(true, true, &gQueuedCmdIndex) //close (vacuum on)
SetEndEffectorGripper(true, true, &gQueuedCmdIndex) //open (compressed air on)
SetEndEffectorSuctionCup(false, true, &gQueuedCmdIndex) //air box off (neither vacuum nor compr. air)