tinyBotGrab

tinyBotGrab

tinyBot Grabbing At the Air

tinyBotGrab uses the gripper for the first time! The robotGrab command sets the force tinyBot applies with the gripper. Positive numbers close the gripper, negative numbers open it. Like moving servos fast, the robotGrab command requires a dely.

Commands used:

robotGrab(<force>)

delay(<time>)

What We Learn:

Unlike the channel 1 through 3 servos, the gripper applies a force instead of moving to a position. It's important to remember this, because it means the gripper will take a minute to get where we want it to go.

Instructions:

Download the program images HERE or click the images below. The file includes both the mimicBlock and Arduino versions of the tinyBotWave program. Copy the program using your computer, then upload it onto tinyBot. Does your robot move like the robot in the GIF at the top of the page?

tinyBotGrab drag and drop

Click to View Full Size

tinyBotGrab Arduino

Download Files:

Don't feel like copying the files? Download the complete program here.

Download tinyBotGrab.ino for Arduino

Download tinyBotGrab.adp for mimicBlock

Cut and paste code:

#include <robot.h>

void setup() {
  // put your setup code here, to run once:
  robotActivate();

}

void loop() {
  // put your main code here, to run repeatedly:
 
  delay(5000);  //this command waits for 5000 milliseconds, which is the same as 5 seconds.
  robotGrab(100);   //The higher the number, the harder the robot grabs. 127 is the maximum
  delay(2000);  //let's wait 2000 milliseconds (2 seconds) to make sure the robot has a good grip
  robotGrab(-100);  //the negative number will open the gripper
  delay(1000);
  robotGrab(0);  //we need to turn off the gripper by resting to zero. That keeps it from wearing out.
 

}