VEML7700 & STEMMA QT connector

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
thosepeoples
 
Posts: 2
Joined: Sat Jun 18, 2022 1:02 am

VEML7700 & STEMMA QT connector

Post by thosepeoples »

Hello I'm currently trying to get the veml7700 board to work with a QT PY ESP32-S2 using the STEMMA QT connector.

All the example code seems to use the sda, scl pins and I'm having trouble getting it to work the STEMMA QT's sda1, scl1 pins.

It was pretty straightforward when using the circuitpython code example but with the arduino code example I'm having trouble changing up the pins.

User avatar
thosepeoples
 
Posts: 2
Joined: Sat Jun 18, 2022 1:02 am

Re: VEML7700 & STEMMA QT connector

Post by thosepeoples »

Solved it! Had to add the 4 lines.
  • #include "Wire.h"
    #define I2C_SDA 41
    #define I2C_SCL 40
    Wire.begin();

Code: Select all

#include "Wire.h" 
#include "Adafruit_VEML7700.h"

#define I2C_SDA 41
#define I2C_SCL 40

Adafruit_VEML7700 veml = Adafruit_VEML7700();

void setup() {
  Serial.begin(115200);
  Wire.begin();
  while (!Serial) { delay(10); }
  Serial.println("Adafruit VEML7700 Test");

  if (!veml.begin()) {
    Serial.println("Sensor not found");
    while (1);
  }
  Serial.println("Sensor found");


Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”