Pioneer Module Mobile Appendix a, Example C Program Demonstrates Gripper and Speaker Functions

Page 24

7.Appendix A

Example C Program Demonstrates Gripper and Speaker Functions

/* ################################################################

*gripper.c --- Saphira-based functions for controlling the gripper and speaker *#################################################################

**Copyright 1997 by Kurt Konolige

**

**The author hereby grants to SRI permission to use this software.

**The author also grants to SRI permission to distribute this software

**to schools for non-commercial educational use only.

**

**The author hereby grants to other individuals or organizations

**permission to use this software for non-commercial

**educational use only. This software may not be distributed to others

**except by SRI, under the conditions above.

**

**Other than these cases, no part of this software may be used or

**distributed without written permission of the author.

**

**Neither the author nor SRI make any representations about the

**suitability of this software for any purpose. It is provided

**"as is" without express or implied warranty.

**

**Kurt Konolige

**Senior Computer Scientist

**SRI International

**333 Ravenswood Avenue

**Menlo Park, CA 94025

**E-mail: konolige@ai.sri.com

**/

#include "saphira.h" /*

* New comm function --- writes two bytes as argument */

(continued)

20

Image 24
Contents Gripper Experimenter’s Module Manual Gripper & Experimenter’s Module Contents Maintenance & Repair Introduction Gripper and Experimenter’s PackagePackage Components User Supplied ComponentsBasic Pioneer Platform Gripper & Experimenter’s ModuleGripper Description Pioneer Gripper side view Experimenter’s Module Description Pioneer 1 Experimenter’s ModuleAdditional Resources Pioneer Web Software ArchivePioneer and Saphira Newsgroups Support Pioneer-support@rwii.comInstallation Remove the ConsoleRemove Microcontroller from Console Installation ReplaceReattach Microcontroller to Console Remove NoseConnect Cables Attach Gripper/Experimenter’s Module to PioneerTest the Assembly Re-Attach the Console CablesRe-Attach the Console Gripper Operation and Programming Gripper Self TestPsos Server Information Packet Gripper I/O Gripper ProgrammingDirect Control via Digital Ports SfRobotCom2BytessfCOMDIGOUT, 0x20 SfRobotCom2BytessfCOMDIGOUT, 0x3SfRobotCom2BytessfCOMDIGOUT, 0x2 Int sfGripperGetState voidGripper functions Experimenter’s Module I/O PortsExperimenter’s Module BREAK, Boot to r Eturn Digin Self-Test Digin To skip Vv.vVProgramming the Digital I/O Ports Programming the A/D PortsProgramming the Speaker Maintenance & Repair Gripper Belt AdjustmentsDrive Lubrication Factory RepairsAppendix a Example C Program Demonstrates Gripper and Speaker FunctionsGripper & Experimenter’s Module Momentary switch, 0 is pressed Gripper & Experimenter’s Module Appendix B Pioneer Server Information PacketIndex ComsayMore, Grinnell Gripper & Experimenter’s Module Warranty & Liabilities