Page 1 of 1

Why can't I detected VEML6075 UV Sensor Module?

Posted: Tue Aug 20, 2024 2:32 pm
by doodleme11
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 819 times
2024-08-20-10-31-06-445.jpg
2024-08-20-10-31-06-445.jpg (1.29 MiB) Viewed 819 times

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

Posted: Wed Aug 21, 2024 11:29 am
by aliarifat794
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

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

Posted: Wed Aug 21, 2024 3:50 pm
by lbernstone
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.