I'm having trouble communicating using both i2c and SPI in the same sketch. I've been trying to use the Arduino Due to gather measurements from an ADXL345 (using SPI), an L3G4200 (using SPI) and an HMC5883L (using i2c). I have a separate sketch that only communicates with the HMC5883 and everything works fine and I receive measurements. But in my main sketch, which includes both the Wire.h and SPI.h libraries, the communication over i2c stops working. I have checked the SCL and SDA pins and both appear to be stuck high. Has anyone else experienced similar behaviour?