Quantcast
Channel: Sensors - Arduino Forum
Viewing all articles
Browse latest Browse all 1074

UV Sensor reading 0

$
0
0

Hi everyone, I'm encountering a problem with my UV sensor, when I read the value I just get 0. It's a basic sensor with VCC, which I've connected to 5V, GND which I've connected to GND, and OUT, which I've connected to A0. I was using another sensor model with the same pins and it gave me the same 0 result.
Right now I'm using this library, all of the example code is giving me 0 as a result, as well as my own code:

#include <AnalogUVSensor.h>

AnalogUVSensor AUV;

void setup() {
  Serial.begin(9600);
  AUV.begin(A0);
}

void loop() {
  float uvi = AUV.read(5);
  Serial.print("UVI: ");
  Serial.println(uvi);
  delay(1000);
}

Does anybody know why? It's an Arduino Uno R3. It's for a student project.
Thanks very much in advance.
I included a picture of the very basic wiring.

7 posts - 5 participants

Read full topic


Viewing all articles
Browse latest Browse all 1074

Trending Articles