The arm will first pick the ice cube from the bowl, reaching the coordinates of the first glass releasing it. Again, travel to retrieve the second ice cube and release it again to the first glass. Now the whole process will be repeated for the second glass. You can change the number of ice cubes that the robot arm will fall into each glass.
We first need to find out the X, Y, Z coordinates of the places where you want to place the glasses and the ice bucket. You can find the coordinates using go to x (), y (), z () i () ms blocks.
You can try to set the coordinates in real time or scene mode. But before you work in the scene mode, upload your firmware by uploading the following code to get away.
When the coding was taken, the robot arm automatically reached the specified location.
As we know, our robot arm will also serve the ice in the glasses with the grip. Thus, we will set the open and close grip angle for each time the robot arm reaches the ice bowl or glasses. We will release two ice cubes in each glass.
When the ice cubes are dropped, it's time to serve the drink. We have immersed our submersible pump in a large jar filled with drinks. And has placed the tube on the robot arm, whose opening can be placed near the gripper. As soon as the ice cubes are dropped, the robot arm reaches back to glass 1 and starts the pump and shuts off the pump according to the length specified by us in the code. Now it fills the glass 2.
To fill the glasses, we need to find out how much time the pump takes to fill a glass. Once you have taken the time, turn on and off the pump during that time (EX: In our case, the pump takes 7 seconds to fill each glass).
Note! You can change the number of ice cubes, glasses and the duration to keep the pump lit. So this is how our robot arm will serve the drinks.