Need coders help to attach digital pin read and

I have a piece of code uploaded to the arduino and it is basically i2c to serial. This is allowing me to control a blinkM now via max msp perfectly.

But what I need to know and need someone to help me with is. Can I add a bit of code onto what I have all ready that will let me read and write to a few digital pins so as I can get an IR sensor to work?

I essentially need max msp to read and write to the digital pins like maxduino does. Can this be added to the code?

Many thanks!

Yes you can add this sort of functionality to the code it is possible. However I don't do MAX so can't help you on the specifics.

Do you think you could mix some firmata code that reads digital pins for me with the code I currently have?