Why can't I detected VEML6075 UV Sensor Module?

doodleme11
Posts: 1
Joined: Tue Aug 20, 2024 2:14 pm

Why can't I detected VEML6075 UV Sensor Module?

Postby doodleme11 » Tue Aug 20, 2024 2:32 pm

Trying to connect a VEML6075 UV Sensor Module to my Node MCU ESP32s. I've hooked everything up on my breadboard but continue to get an error.

Here is the error in the serial monitor:

[Codebox]Adafruit VEML6075 UV Sensor Test
Failed to find VEML6075 chip[/Codebox]

Here is the code:

[Codebox]#include <Wire.h>
#include <Adafruit_VEML6075.h>

// Create an instance of the sensor
Adafruit_VEML6075 uv = Adafruit_VEML6075();

void setup() {
Serial.begin(115200);
Serial.println("Adafruit VEML6075 UV Sensor Test");

if (!uv.begin()) {
Serial.println("Failed to find VEML6075 chip");
while (1);
}
Serial.println("VEML6075 found!");
}

void loop() {
// Read UV light data
float uva = uv.readUVA();
float uvb = uv.readUVB();

// Print the data
Serial.print("UVA: ");
Serial.print(uva);
Serial.print(" UVB: ");
Serial.println(uvb);

delay(1000); // Wait for 1 second before the next reading
}
[/Codebox]
2024-08-20-10-30-42-359.jpg
2024-08-20-10-30-42-359.jpg (1.74 MiB) Viewed 1085 times
2024-08-20-10-31-06-445.jpg
2024-08-20-10-31-06-445.jpg (1.29 MiB) Viewed 1085 times

aliarifat794
Posts: 170
Joined: Sun Jun 23, 2024 6:18 pm

Re: Why can't I detected VEML6075 UV Sensor Module?

Postby aliarifat794 » Wed Aug 21, 2024 11:29 am

Check the continuities of your jumper wires. Also, the I2C address of the sensor must be checked. Try the I2C scanner code to verify the I2C address.
If you need more info about the I2C communication of ESP32, you can check this out: https://www.theengineeringprojects.com/ ... odule.html

lbernstone
Posts: 826
Joined: Mon Jul 22, 2019 3:20 pm

Re: Why can't I detected VEML6075 UV Sensor Module?

Postby lbernstone » Wed Aug 21, 2024 3:50 pm

Two likely issues- incorrect pin assignments, and incorrect I2C address.
Try running the WireScan example to find the correct address.
Add Wire.setPins(sda, scl) in setup before you call Wire.begin to make sure you have the correct pins assigned.

Who is online

Users browsing this forum: No registered users and 56 guests