New 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 ...


1

So after repeated tests I found several problems, software and hardware. The cables I used on the breadboard where facing each other. The metal parts where touching ( from a defect of the cables ). Turned them 90*. The Oled display was NOT Initialized properly. When using display.write() or display.print() you must first put the cursor at (0;0) by display....


1

You don't need the I2C multiplexors at all - I currently have seven MPU6050 modules being managed by one Teensy 3.5 chip. Four MPU6050's are on one of the T3.5's I2C busses, and the remaining three are on another. I could run them all from just one I2C bus, but I split them just for wiring convenience. The 'trick' is to replace the I2C address of each ...


3

It seems like you would need to call .begin() on your Adafruit_MPU6050 instances, like the examples do. So, following the pattern, in setup() you would need to: tcaselect(0); if (!mpu1.begin()) { Serial.println(F("Failed to find MPU6050 chip 1")); while (1) { delay(10); } } tcaselect(1); if (!mpu2.begin()) { Serial....


Top 50 recent answers are included