Pioneer Module Mobile manual Gripper & Experimenter’s Module

Page 25

Gripper & Experimenter’s Module

void

sfRobotCom2Bytes(int com, int high, int low)

{

sfRobotComInt(com, ((high & 0xff)<<8) + (low & 0xff));

}

/*************************************************************

*Speaker functions -- play a tone string

*Format of string is L1 T1 L2 T2 .... Ln Tn

*where Li is length of tone i in 20ms increments

*

and Ti is tone half-cycle time in 150us increments

*

 

*Max length of string is 40 bytes (20 tones)

**************************************************************/

void

sfPlayToneString(char *str, int n)

{

if (n > 40) n = 40; sfRobotComStrn(sfCOMSAY, str, n);

}

/*************************************************************

*Gripper functions --- set and retrieve gripper state

*

*States are sfUP, sfDOWN, sfMIDDLE, sfOFF, and sfMOVING

*sfMOVING occurs only during transitions between states

*sfOFF can be set by the user, which means no state control

*sfOFF can be set by the robot to indicate a timeout

*

**************************************************************/

/* states */

 

#define sfGRIPOFF

0

#define sfGRIPUP

1

#define sfGRIPMOVING 2 #define sfGRIPMIDDLE 4 #define sfGRIPDOWN 5 #define sfCOMGRIPPER 33

(continued)

21

Image 25
Contents Gripper Experimenter’s Module Manual Gripper & Experimenter’s Module Contents Maintenance & Repair Gripper and Experimenter’s Package IntroductionPackage Components User Supplied ComponentsGripper & Experimenter’s Module Basic Pioneer PlatformGripper Description Pioneer Gripper side view Pioneer 1 Experimenter’s Module Experimenter’s Module DescriptionPioneer Web Software Archive Additional ResourcesPioneer and Saphira Newsgroups Pioneer-support@rwii.com SupportRemove the Console InstallationRemove Microcontroller from Console Replace InstallationRemove Nose Reattach Microcontroller to ConsoleConnect Cables Attach Gripper/Experimenter’s Module to PioneerRe-Attach the Console Cables Test the AssemblyRe-Attach the Console Gripper Self Test Gripper Operation and ProgrammingPsos Server Information Packet Gripper Programming Gripper I/ODirect Control via Digital Ports SfRobotCom2BytessfCOMDIGOUT, 0x3 SfRobotCom2BytessfCOMDIGOUT, 0x20SfRobotCom2BytessfCOMDIGOUT, 0x2 Int sfGripperGetState voidGripper functions I/O Ports Experimenter’s ModuleExperimenter’s Module Digin Self-Test BREAK, Boot to r EturnDigin To skip Vv.vVProgramming the A/D Ports Programming the Digital I/O PortsProgramming the Speaker Gripper Belt Adjustments Maintenance & RepairDrive Lubrication Factory RepairsExample C Program Demonstrates Gripper and Speaker Functions Appendix aGripper & Experimenter’s Module Momentary switch, 0 is pressed Gripper & Experimenter’s Module Pioneer Server Information Packet Appendix BComsay IndexMore, Grinnell Gripper & Experimenter’s Module Warranty & Liabilities