I am trying to read an ADXL accelerometer via I2C using the Wire library at regular intervals. A periodic interrupt to fill a global buffer seems like a reasonable solution, but calls to Wire.endTransmission() crashes if called from within an interrupt service routine. The amount of data I am reading is pretty minimal and the read takes only about 1 millisecond. I am running the ISR at intervals of about 10 msec, so I think timing is not a problem.
Does anyone have ideas about why the Wire library and ISR might interfere with on another? Thank you,