Example code not working (wire.write and wire.read)

Perhaps that code was written for an earlier version of Arduino. There were a number of changes in 1.0, probably including changes in the Wire library.