Addressing different PiFace Digital boards is simple, you are just required to specify the number of the board you wish to address, in your read and write commands.
p.digital_write(pin_number, value, board_number)
p.digital_write(5, 1, 2) # writes pin5 on board2 high
p.digital_read(2, 3) # reads pin2 (on board3)
The following example code turns each LED/output on four PiFace Digitals on and then off.
from time import sleep
import pifacedigitalio as p
for value in range (0,2):
for board in range (0 , 4): # for use with four boards, reduce this for fewer boards
for pin in range (0,8):