Needed: I2C scanner that works in Arduino 1.0

I sure could use a sketch that can find any I2C devices connected to my Arduino and report their addresses. I've found several sketches claiming to do this, but they all seem to be using libraries that are not compatible with Arduino 1.0 and above. Can anyone point me to an I2C scanner sketch that still works? Thanks!

Looks like the twi_writeTo() function now takes five arguments instead of four:

uint8_t address,
uint8_t* data,
uint8_t length,
uint8_t wait,
uint8_t sendStop

Perhaps adding a 0 for the 'sendStop' will fix it:

    rc = twi_writeTo(addr, &data, 0, 1, 0);

If that doesn't work, try using 1.