ActivMedia Robotics

For example, here’s the AROS client command to set digital output ports one and three (OD1 and OD3), reset port four (OD4), and leave all the rest alone (hexadecimal notation):

0xFA, 0xFB, 0x06, 0x1E, 0x1B, 0x19, 0x09, 0x37, 0x24

Bumper and IR I/O

Two 10-position latching IDC connectors on the H8S controller provide 16 digital input ports, normally used for the bumper accessory, but also available for your own attachments. See Appendix A for connector details.

Similarly, the Motor-Power connector on the H8S controller contains eight digital inputs that we normally use for IR sensors on the Performance PeopleBot and PowerBot, and whose states are digitally mapped. See Appendix B for connector details.

Normally pulled high (digital 1), all the bumper and IR bit-mapped switches go low (digital 0) when the respective port gets triggered. Bumper inputs also appear with the stall bits in the standard SIP, but unlike in the IOpac, are modified by the InvertBumps mask. All the bumper and IR data bits appear in the IOpac packet.

IO packets

Table 13. IOpac packet contents

LABEL

BYTES

CURRENT VALUE

DESCRIPTION

HEADER

2

0xFA, 0xFB

Common header

BYTE COUNT

1

22

 

Number of data bytes + 2

TYPE

1

0xF0

Packet type

N DIGIN

1

4

 

Number of digital input bytes

DIGIN

1

varies

0-255

ID0-8 bits mapped

FRONTBUMP*

1

varies

0-255

Front bumper bits mapped

REARBUMP*

1

varies

0-255

Rear bumper bits mapped

IR

1

varies

0-255

IR inputs

N DIGOUT

1

1

 

Number of digital output bytes

DIGOUT

1

varies

0-255

Digital output byte(s)

AN

1

5

 

Number of A/D values

A/D

10

5 integers

A/D ports 1-5 input values at 12-

 

 

varying

0-2047

bit resolution = 0-5 VDC

CHECKSUM

2

varies

Computed checksum

Not all analog and digital I/O appears in the standard SIP. Accordingly, your client software may request the IOpac SIP (type = 240; 0xF0), which contains all common I/O associated with the H8S controller and which appear on the various connectors, including User IO, General IO, Bumpers, and IRs.

Use the AROS client IOREQUEST command number 40 with an argument value of zero, one, or two. The argument value one requests a single packet to be sent by the next client-server communications cycle. The request argument value of two tells AROS to send IOpac packets continuously, at approximately one per cycle depending on serial port speed and other pending SIPs. Use the IOREQUEST argument value zero to stop continuous IOpac packets.

*Actual bits, not affected by InvertBumps since bumper bits may be used for other digital input besides bumpers.

49

Page 55
Image 55
Pioneer 2TM, 3TM manual Bumper and IR I/O, IO packets