apds 9960 not initiating

I received bought the APDS 9960 gesture and proximity sensor. I soldered header pins in. When I try to run the GestureTest example from the SparkFun_APDS9960_RGB_and_Gesture_Sensor library it never get past the initiation attempt. In there code:

 // Initialize APDS-9960 (configure I2C and initial values)
  if ( apds.init() ) {
    Serial.println(F("APDS-9960 initialization complete"));
  } else {
    Serial.println(F("Something went wrong during APDS-9960 init!"));
  }

nothing is printed. Seems like apds.init() never returns.

I’m using the RedBoard (Aurduino Uno) so I set up a step-down circuit from 5V to 2.5V since the APDS9960 takes a maximum of 3.3V. I don’t have a set of resistors that really comes close to a 2:3 ratio so I run power and the I2C wires from the RedBoard to a 2.2kOhm resistor. Then V_out and another 2.2kOhm resistor going to ground. If I measure the voltage on the V_out wire and ground, I get the expected 2.5V (actually 2.48V). But I plugj that wire into the breadboard on the same row as VCC on the APDS9960 and measure voltage at the top of the pin, I measure 1.96V. So where is the extra drop coming from? I suspect this is why the board isn’t responding to the init() function.

As a test, I ran a wire from the RedBoard 3.3V output to VCC on the APDS9960 and measured the voltage at the top of the pin and get 3.29V. Anyone have thoughts as to what is going on here?

My next step right now is to get the bi-directional logic level converter but that’ll take some time.

Thanks for any help,

Bryan

I think you made it more difficult than it needs to be. Power the APDS 9960 with the 3V3 from the Redboard. On the APDS 9960 are pull-up resistors for SCL and SDA to this 3V3. Just connect SDA and SCL directly to the Redboard. No need for more resistors.

Thanks. I will give that a try. I was thrown by this statement in the setup guide:

Level shifting – If you are using a 5V Arduino, like the Uno or RedBoard, you will need to use a level shifter, such as the bi-directional logic level converter

If it’s as easy as using the 3.3V power source for VCC, they sure made it sound complicated.