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]
Why can't I detected VEML6075 UV Sensor Module?
-
- Posts: 1
- Joined: Tue Aug 20, 2024 2:14 pm
-
- Posts: 198
- Joined: Sun Jun 23, 2024 6:18 pm
Re: Why can't I detected VEML6075 UV Sensor Module?
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
If you need more info about the I2C communication of ESP32, you can check this out: https://www.theengineeringprojects.com/ ... odule.html
-
- Posts: 828
- Joined: Mon Jul 22, 2019 3:20 pm
Re: Why can't I detected VEML6075 UV Sensor Module?
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.
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 91 guests