Grabber

Other libraries:
Powerbrain
Motor
Pivot
Twister
IR Sensor
Light Sensor

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 library

       TBGrabber 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 library

       TBGrabber 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 library

       TBGrabber 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);
       }