Creating a gripper really slowed this project down, since I only had one motor port available for it – each NXT needs two for its linear actuators and the master needs one for the NXT-PF cable for communicating using the LEDs, leaving only one port on the slave. Since the weight of a motor turned out to be too much for the moving part of the structure, I used pneumatics instead. the problem with that is the need for at two things: a switch operator and a pumper – two motors.
The solution came in the form of a differential, which contributes the input power applied to it to one of two outputs depending on which one has a smaller resistance (check this 1930s tutorial for a much better explanation). So when the motor starts turning, it first moves the least resistant part – the switch. Once the switch is all the way to the opposite side, it blocks that output on the differential and makes the motor move the pump – when the motor is spun forwards, the actuator goes up, and when it goes backwards, it goes down:
The gripper itself is pretty simple, and opens/ closes when the actuator moves the middle part up, pushing the two “fingers” to opposite sides. Its size allows it to grab either the blue or red ball that come with the NXT 1.0 kit.