Arduino code for gripper


#1

Hi,
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?

Thanks!

Update:
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)


#2

Hi robo,
I had same probelem to activate suction cup,
I tried ur solution to write
SetEndEffectorSuctionCup(true, true, &gQueuedCmdIndex);

but still there is no activity at all


#3

Hi,
It has been quite a while since using this program for me, but it does seem like some library was not loaded since it does not recognize the command. I described the project that I used this for I an article on my website. If you look I to the program I used you can see which libraries are loaded. Hope that helps.
https://uptimefab.com/2020/02/12/controller-for-the-dobot-magician-with-nextion-touchscreen/
Best,
Robin


#4

it solved after saw ur program so i made some mistake without adding protocol process every time for execution will be done