Using two 8-bit shift registers

dannable:
I don't know if this by Nick Gammon will be of any use?

Gammon Forum : Electronics : Microprocessors : Using a 74HC595 output shift register as a port-expander

It does the trick indeed, thanks. Although with the code provided I can set any LED I want on or off, but for now only through Arduino's serial monitor. The commands to be sent to Arduino are like: 011 (turn the first LED of the first register on), 010 (turn it off), 121 (turn the 2nd LED of the 2nd register on) etc.

Sending similar number to Arduino from Pd doesn't seem to work. Any idea on how to achieve communication?

Thanks