There are two ribbon cables that run from the gripper end all the way to the logic board, the edge that is read is index for wire 1.
(cable with Red index)
1, 2 Cube touch DIO-0
3, 4 Gripper closed reverse
5, 6 Gripper open forward
7, 8 Wrist down reverse
9, 10 Wrist up forward
11, 12 Climber DIO-4
(cable with black index)
13, 14 arm rotation limit up reverse
15, 16 arm rotation limit down forward
17, 18 extension limit far reverse
19, 20 extension limit near forward