You need to break up the command into two parts. You use the I2COut to output the address and the I2cIn to do the actual read. There is a little more information up on the Lynxmotion site in the thread:
http://www.lynxmotion.net/viewtopic.php ... ilit=i2cinI have not done any I2C for awhile so I am rusty. The newer syntax is closer to what is normally done with I2C commands... Looking at your code, the new stuff would be something like:
Code:
'Get_Type'
i2cout p3, p2, 162, [176]
i2cin P3,P2,162,[Port_Type.highbyte]
I2CIN P3,P2,162,[Port_Type.lowbyte]
But to be sure I would need to test it. A couple other variations may be needed. You may need to have to output a second I2cOut with the 177 as an address...
Also if it were me I would also see if the I2cIn command actually allowed multiple bytes to be read and write it like:
Code:
'Get_Type'
i2cout p3, p2, 162, [176]
i2cin P3,P2,162,[Port_Type.highbyte, Port_Type.lowbyte]
Maybe soon I will drag out one of my SRF08 sensors and try it out...
Kurt