I recently purchased a MLX90640 (55 FOV) and a teensy 3.2. I connected the mlx as suggested in this [hook-up guide, but it’s not working with example code 1.
It keeps saying “MLX90640 not detected at default I2C addres. Please check wiring. Freezing.” I have tried running a I2c_scanner, but that tells me there is an “Unknown error at address…”.
I am running Arduino IDE version 1.8.8 on Windows 10 with the most recent version of teensyduino.
Is the “Unknown error at address…” all that the serial terminal is printing when you are running the I2C Scan? It should be printing something after that so I am not sure what is going on here. How are you connecting the MLX90640 to your Teensy? Can you take a couple of photos of your circuit and attach them to your response?
It actually has a list of 128 different unknown errors for addresses starting at 0x01 all the way through 0x7E, and it includes 0x33, which is the address for the MLX90640 I believe.
I currently have it connected through a breadboard, but also have had the qwiic pins directly plugged in the teensy and the teensy plugged into the breadboard with breakaway headers (as on the picture in the guide). That all had the same result. (Added LEDS are to test that my code is even running in the first few steps of set up – which it does – also don’t affect the I2C results.)
Interesting. I have not seen the I2C scanner sketch return something like that before but if I were to guess, I think it is related to an intermittent connection issue that is causing the sketch to return so many errors.
Your photos seem to confirm this since simply wrapping wire around the vias on your Teensy is not going to create a solid connection for testing this or other peripherals. If you take a closer look at the [photo in the Hookup Guide, you will see the Teensy has headers soldered into place. If you simply placed the Teensy on top of breakaway headers in your first testing, that would certainly result in some erratic behavior from the MLX90640 since there is not a good connection between the vias and the pins on the headers.
I would recommend soldering the headers into place or soldering the wires going from the breadboard to your Teensy into place so you have a good connection. Another option would be to use something like these [IC Hooks with pigtail to create a temporary connection that will be better than wrapping wire around the vias.
Are you seeing “Unknown error at address 0xXX” where XX is a number between 01 and 7E?
If so, that would indicate the Teensy is seeing an open I2C bus with no pullups. Even a broken MLX90640 should return “No I2C devices found” You may have damaged the Teensy.
Can you try attaching another known working I2C device to the Teensy to see if that’s detected?
OK, that sounds like a damaged Teensy. What’s happening is the I2C pins on the Teensy are not working and the processor is seeing a low on SDA and SCL even though the board you’ve attached has pullups. Wrapping stranded wires through the holes in the Teensy is likely what caused the issue as it’s easy to short something out that way. Unfortunately you’re going to need to try a new Teensy.
Head on over to [this page and fill out the form on the right hand side. Don’t forget your order number and in the "Why do you want an RMA section put a brief description of the issue as well as the URL for this page and we can help.](Return Policy - SparkFun Electronics)