Grabber - Tinkerbots

ARDUINO LIBRARY GRABBER

The Grabber module gives your robots the ability to pick up things. It can be operated at different speeds, and works really well, paired with a set of Pivots and/or Twisters. Automatic resistance detection will protect any object from too much force.

FUNCTION OVERVIEW

FUNCTION DESCRIPTION

 

    NAME

TBGrabber()

    DESCRIPTION

Instance a Module from Type Grabber. It is neccessary to include the header file.
#include “TBGrabber.h”

    SYNTAX

TBGrabber(color);

    PARAMETER

color: Color of the module which is shown during setup.
Values: RED, GREEN, BLUE, MINT, PURPLE, YELLOW, WHITE

    RETURN

None

    EXAMPLE

 

#include “TBGrabber.h”      //include the module libraryTBGrabber grabber(MINT);   //creating an instance

void setup()
{
grabber.open();
}

void loop()
{
grabber.open(50);      //open arms with half speed
delay(500);
grabber.close(50);      //close arms with half speed
delay(500);
}

 

    NAME

close()

    DESCRIPTION

Move the Grabber arms from inner to outer position, closes the arms. The movements will stop automatically when the end is reached or any resistance is measured.

    SYNTAX

close();
close(speed);

    PARAMETER

speed: Sets the speed how fast the arms should close.
Value: 0-100 (in Percent)

    RETURN

None

    EXAMPLE

 

#include “TBGrabber.h”      //include the module libraryTBGrabber grabber(MINT);   //creating an instance

void setup()
{
grabber.open();
}

void loop()
{
grabber.open(50);      //open arms with half speed
delay(500);
grabber.close(50);      //close arms with half speed
delay(500);
}

 

    NAME

open()

    DESCRIPTION

Move the Grabber arms from inner to outer position, opens the arms. The movements will stop automatically when the end is reached or any resistance is measured.

    SYNTAX

open();
open(speed);

    PARAMETER

speed: Sets the speed how fast the arms should open.
Value: 0-100 (in Percent)

    RETURN

None

    EXAMPLE

 

#include “TBGrabber.h”      //include the module libraryTBGrabber grabber(MINT);   //creating an instance

void setup()
{
grabber.open();
}

void loop()
{
grabber.open(50);      //open arms with half speed
delay(500);
grabber.close(50);      //close arms with half speed
delay(500);
}