Your first reaction was probably correct, it is likely you have a hardware problem as the code appears to be telling you it can't find the sensor. I'd suggest checking the wiring to your sensor (adafruit usually has good tutorials on connecting their devices). You could also load a Fritzing sketch of your hardware layout here.
Peter