Hot answers tagged

5

The program most likely hangs at Wire.endTransmission();, because that's where the actual I2C communication happens. Wire.write() does nothing but placing the data into the internal buffer of the Wire library. You experience problems because you are calling interrupt-dependent code inside an ISR, where interrupts are deactivated by default. The Wire library ...


1

The unmodified RTCLib DS3231 sample code running on Arduino Due defaults to the Wire I2C connection on pins 20 SDA and 21 SCL. To enable the same sketch to connect to a device connected to the Wire1 I2C connection on pins 70 SDA1 and 71 SCL1, I changed line 333 of RTClib.h to reference &Wire1 rather than &Wire. Successful test output from the Wire1 ...


Only top voted, non community-wiki answers of a minimum length are eligible