I have been playing with this since January. I have been wanting to connect other sensors to the pi and Matlab. I came crossed some forums on the mat lab community of how to use S-Function Builder. The problem I have is every time I try to use one of the models there it fails to compile. I have fallowed lots of other instructions to do this with the same result. Have you ever used S-function builder to talk to some SPI/I2C sensor? Is there a chance you can post the module you are using above? I would like to use this at a raspberry Pi Jam next week. It is more complete than mine.