Ultrasonic I2C problems
-
I have a problem with the I2C version of the Ultrasonic distance measuring unit. If I connect it together with the MLX90640 Thermal Camera Unit the Camera data is corrupted. If I load and run the Demo and only connect the Ultrasonic distance measuring unit every other sample has the distance 4500mm. If I use this code it works fine in the demo but still corrupts the Thermal camera
uint32_t data;
Wire.beginTransmission(0x57); // Transfer data to 0x57.
Wire.write(0x01);
Wire.endTransmission(); // Stop data transmission with the Ultrasonic Unit.
delay(120);
Wire.requestFrom(0x57,3); // Request 3 bytes from Ultrasonic Unit.
data = Wire.read();data <<= 8;
data |= Wire.read();data <<= 8;
data |= Wire.read(); -
It seems if I set the i2c rate to 100Khz this works.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login