Im still a little Iffy on my I2c communications as well, I just learned some new tricks that might help you out.
First thing is to make sure that you have Robot C 1.07 installed and under the Window tab / menu level, make sure Expert is checked.
there is a Test I2c utility located under the Robot tab/ Nxt Brick. It looks like you can play with I2c messages and get replys back without writing any code. I just read about it today so i haven't played with it, but it looks powerful to test messaging out.
Now that expert mode is selected, there should now be a long list of commands located in the Code Templates menu on the left of the screen. If you double click on Sensors Digital it has these I2c commands briefly described
sendI2CMsg(nPort, sendMsg, nReplySize);
readI2CReply(nPort, replyBytes, nBytesToRead);
it appears that when sending a message, you have to specify the number of bytes your exspecting back from the I2c device, if you put 0 the device will not reply.
The best way iv found to check variables while running a program is to use the nxt display to print it on the screen. I use this command usually:
nxtDisplayTextLine(nLineNumber, sFormatString, parm1, parm2);
This will let you print it on the screen and monitor it easily
nxtDisplayTextLine(0, "TextA: %d", VariableA);
nxtDisplayTextLine(1, "TextB: %d", VariableB);
nxtDisplayTextLine(2, "TextC: %d %d", VariableA, VariableB);
There is a Robot C Wiki page located at http://www.robotc.net/wiki/index.php?title=Main_Page
It looks like nobody's added anything yet.
Hope this all help you out