RSeries astromech firmware
Gripper Class Reference

#include <body/Gripper.h>

Detailed Description

Controls a TB662 motor controller to open/close gripper hand.

Smoke will run for a maximum of 6.5 seconds with a minimum of 5 minute pause in between activations.

ANIMATION(gripper)
{
// Gripper arm
DO_COMMAND("GPARM")
// Gripper on
DO_COMMAND("GPON")
// Fake being dead for 8 seconds
// Ok We are back!
DO_COMMAND("ST$0109")
// Close pies
// Close pie panels
servoDispatch.moveServosTo(PIE_PANELS_MASK, 150, 100, 2400);
})
}
+ Inheritance diagram for Gripper:
+ Collaboration diagram for Gripper:

Public Member Functions

 Gripper (byte idPin, byte in1Pin, byte in2Pin, byte pwmPin, byte standbyPin, byte gripperOpenPin, byte gripperClosePin)
 Constructor. More...
 
bool isAttached ()
 
bool isGripperOpen ()
 
bool isGripperClosed ()
 
void gripperArm ()
 Arm gripper. More...
 
void gripperDisarm ()
 Disarm gripper. More...
 
void gripperOn ()
 Turn on the gripper. More...
 
void gripperOff ()
 Turn off the smoke machine. More...
 
virtual void handleCommand (const char *cmd) override
 Gripper Commands start with 'GP'. More...
 
virtual void animate () override
 Perform a single frame of welder animation. More...
 
- Public Member Functions inherited from CommandEvent
 CommandEvent ()
 Default Constructor. More...
 
virtual void handleCommand (String cmd)
 Subclasses should implement this function to process commands specific to their device. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from CommandEvent
static void process (char *cmd)
 Calls handleCommand() for each created CommandEvent subclass. More...
 
static void process (const char *cmd)
 Calls handleCommand() for each created CommandEvent subclass. More...
 
static void process (PROGMEMString pcmd)
 Calls handleCommand() for each created CommandEvent subclass. More...
 

Constructor & Destructor Documentation

◆ Gripper()

Gripper::Gripper ( byte  idPin,
byte  in1Pin,
byte  in2Pin,
byte  pwmPin,
byte  standbyPin,
byte  gripperOpenPin,
byte  gripperClosePin 
)
inline

Constructor.

Member Function Documentation

◆ animate()

virtual void Gripper::animate ( )
inlineoverridevirtual

Perform a single frame of welder animation.

Implements AnimatedEvent.

◆ gripperArm()

void Gripper::gripperArm ( )
inline

Arm gripper.

◆ gripperDisarm()

void Gripper::gripperDisarm ( )
inline

Disarm gripper.

◆ gripperOff()

void Gripper::gripperOff ( )
inline

Turn off the smoke machine.

◆ gripperOn()

void Gripper::gripperOn ( )
inline

Turn on the gripper.

◆ handleCommand()

virtual void Gripper::handleCommand ( const char *  cmd)
inlineoverridevirtual

Gripper Commands start with 'GP'.

Implements CommandEvent.

◆ isAttached()

bool Gripper::isAttached ( )
inline

◆ isGripperClosed()

bool Gripper::isGripperClosed ( )
inline

◆ isGripperOpen()

bool Gripper::isGripperOpen ( )
inline

The documentation for this class was generated from the following file:
DO_START
#define DO_START()
Definition: Animation.h:15
DO_ONCE
#define DO_ONCE(p)
Definition: Animation.h:19
ANIMATION
#define ANIMATION(name)
Definition: Animation.h:14
DO_WAIT_SEC
#define DO_WAIT_SEC(sec)
Definition: Animation.h:25
DO_END
#define DO_END()
Definition: Animation.h:39
DO_COMMAND
#define DO_COMMAND(cmd)
Definition: Animation.h:34