although I own only 3 weeks an Arduino Mega2560 I'm totally thrilled by the concept and the possibilities offered by this platform. I rummaged through my junk box and I found a LM75. On the internet I found some programs that could read the temperature. But these programs didn't use the full functionality of the LM75. So I decided that's a good chance to write a library by my own. Because I'm only a beginner it was really hard to do but I learned a lot.
My LM75 library uses the full functionality of the chip, like reading temperature, defining threshold values for alarm output or setting sleep mode. I'm sure that I didn't program in a perfect way, code could be certainly more compact and so on, but I'm happy to share it with you.
Download the library here and try out the demo sketch.
Unfortunately The LM75 will only be provided as SMD component so wiring on a breadboard in not easy. I took 2 sections of a ribbon cable, stripped off the isolation and soldered the chip to the ends. It doesn't look very professional but it works.
Minimal wiring of the chip is: Power (5V), SDA and SCL for I²C with pullup resistors of 10k. I tight address pins to ground signal. If you want to use interrupts, pin 3 should be connected to the Arduino INT input pin. Take a look at the datasheet of the LM75 to understand comparator mode and interrupt mode.
(My work on the library has been inspired by this page.)
Feel free to comment my work, I'm curious about your comments.