Why can't I detected VEML6075 UV Sensor Module?
Posted: 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]
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]