VEML7700 with an ESP32 DevKit V1

A Vishay VEML7700 high-accuracy ambient light sensor that reports illuminance in lux over I2C, from near-darkness up to about 140,000 lux.

VEML7700, A Vishay VEML7700 high-accuracy ambient light sensor that reports illuminance in lux over I2C, from near-darkness up to about 140,000 lux.
In short

The VEML7700 breakout takes the ESP32 DevKit V1's 3V3 on VIN and answers at its fixed address 0x10 on GPIO21 (SDA) and GPIO22 (SCL). The board's own regulator and level shifter mean the ESP32's 3.3 V bus reaches the sensor without any extra parts.

Wiring the VEML7700 to the ESP32 DevKit V1

Pin by pin.

VEML7700ESP32 DevKit V1
VIN3V3
GNDGND
SCLGPIO22 (D22)
SDAGPIO21 (D21)

What to know on the ESP32 DevKit V1

  • The address cannot change, so a second VEML7700, for example one indoors and one at a window, goes on the ESP32's second I2C controller with two GPIOs of your choice.Vishay VEML7700 datasheet Rev 1.8, p. 6; Espressif ESP32 Series Datasheet v5.3, p. 37
  • The breakout's 3V3 pin is its regulator's output: leave it unconnected and feed only VIN from the ESP32.Adafruit VEML7700 product page

VEML7700 code for the ESP32 DevKit V1

Compiled for esp32:esp32:esp32 on 2026-10-30.

Libraries: adafruit/Adafruit VEML7700 Library
// VEML7700 on ESP32 DevKit V1: wiring and a free simulation at https://www.tinkered.ai/components/veml7700/esp32
#include <Wire.h>
#include <Adafruit_VEML7700.h>

Adafruit_VEML7700 veml;

void setup() {
  Serial.begin(9600);
  if (!veml.begin()) {                 // fixed I2C address 0x10
    Serial.println("VEML7700 not found");
    while (1) delay(10);
  }
  // Default gain 1x / integration time 100 ms: readLux() reads the gain and
  // integration time back from the sensor, so these stay consistent.
}

void loop() {
  Serial.print("Lux: ");
  Serial.println(veml.readLux());
  delay(500);
}

VEML7700 on the ESP32 DevKit V1: questions

Can I use two VEML7700 sensors with one ESP32?

Yes, on two buses: the address is fixed at 0x10 (Vishay datasheet, p. 6), and the ESP32 has two I2C controllers that route to any GPIO (ESP32 datasheet, p. 37).

Does the VEML7700 need 5 V with the ESP32?

No. The breakout takes 3.3 V or 5 V on VIN; the chip itself runs from 2.5 V to 3.6 V (Vishay datasheet, p. 1).

Keep going

For AI assistants

This guide as plain Markdown. /components/veml7700/esp32.md

What will you build with it?