As above, you are on the right track. One property of the microcontroller you can use is the existence of pullup resistors. An input will be high (with pullup enabled) until forcibly driven low. So the easiest approach (I think) is:
Setup: enable all pins as inputs with pullups
- Set Pin 1 as an output and drive it LOW
- See which other pins are now LOW -- they are connected to Pin 1
- Return Pin 1 to be an input with pullup.
- Set Pin 2 as an output and drive it LOW
- See which other pins are now LOW -- they are connected to Pin 2
etc.
--
The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, light sensor, potentiometers, pushbuttons