Giter Site home page Giter Site logo

ltr390's People

Contributors

levkovigor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ltr390's Issues

UV Index shows zero!

I have tried out this library even though readUVS() gives data, the UV Index is zero:

Modded example:

...
void loop() {
  if (ltr390.newDataAvailable()) {
    if (ltr390.getMode() == LTR390_MODE_ALS) {
      Serial.print("Ambient Light Lux: ");
      Serial.println(ltr390.getLux());
      ltr390.setGain(LTR390_GAIN_18);                  //Recommended for UVI - x18
      ltr390.setResolution(LTR390_RESOLUTION_20BIT);   //Recommended for UVI - 20-bit
      ltr390.setMode(LTR390_MODE_UVS);
    } else if (ltr390.getMode() == LTR390_MODE_UVS) {
      Serial.print("UV Index: ");
      Serial.println(ltr390.getUVI());
      Serial.print("UV Data: ");                       // added for debug
      Serial.println(ltr390.readUVS());                // added for debug
      ltr390.setGain(LTR390_GAIN_3);                   //Recommended for Lux - x3
      ltr390.setResolution(LTR390_RESOLUTION_18BIT);   //Recommended for Lux - 18-bit
      ltr390.setMode(LTR390_MODE_ALS);
    }
  }
}
...

Result:

UV Index: 0
UV Data: 181
Ambient Light Lux: 11540
UV Index: 0
UV Data: 184
Ambient Light Lux: 11539
UV Index: 0
UV Data: 184
Ambient Light Lux: 11521
UV Index: 0
UV Data: 177
Ambient Light Lux: 11507
UV Index: 0
UV Data: 182
Ambient Light Lux: 11507
UV Index: 0
UV Data: 180
Ambient Light Lux: 11522
UV Index: 0
UV Data: 180
Ambient Light Lux: 11499

About 'unused-variable' in LTR390.cpp

Hi.
If there are no other problems, could you please remove the return value byte ack of writeRegister() on line 53 of LTR390.cpp?
I presume that this is due to the Arduino IDE ESP32 Core, but since "-Werror=unused-variable" is enabled, a compiler error occurs as below.

c:\Users\_____\Documents\Arduino\libraries\LTR390\src\LTR390.cpp:53:8: error: unused variable 'ack' [-Werror=unused-variable]
   byte ack = writeRegister(LTR390_MAIN_CTRL, _r);
        ^~~
cc1plus.exe: some warnings being treated as errors

Wfac for perspex

I built a perspex casing for my sensor. Will this also fall under a wfac of 1 or should it be higher?

High UV Index value

I am using an Adafruit LTR390 UV Light Sensor with Seeed Xiao (SAMD21). The latest example sketch (1.06) displays the results below. Why is it showing UV Index around 15 when the sensor is directly facing to sun at the noon 12:00 (temp 28 C)?

UV Index: 2.22
UVS: 3107
Ambient Light Lux: 18513.80
UV Index: 2.89
UVS: 4050
Ambient Light Lux: 19191.60
UV Index: 4.31
UVS: 6036
Ambient Light Lux: 50179.00
UV Index: 6.54
UVS: 9157
Ambient Light Lux: 42516.80
UV Index: 14.46
UVS: 20239
Ambient Light Lux: 52428.60
UV Index: 13.41
UVS: 18780
Ambient Light Lux: 52428.60
UV Index: 13.72
UVS: 19214
Ambient Light Lux: 52428.60
UV Index: 15.02
UVS: 21021
Ambient Light Lux: 52428.60
UV Index: 15.18
UVS: 21255
Ambient Light Lux: 52428.60
UV Index: 15.02
UVS: 21026

LTR390 Not Connected Error

Using adafruit's ltr390 sensor board connected via stemma qt, something in the initialization is failing. I don't yet have an environment setup to where I can debug the specific line that's causing the failure. I've attempted this with both an Uno R3 and Teensy 4.0 and both yield same result. The adafruit library example does work on the Uno R3 so I know it's physically connected correctly and I've confirmed the address is unchanged at 0x53.

image

Could this be used as a UVI sensor for reptile lamp ?

Hi !

Sorry, this might not be the right place to ask this but you seem to be very familiar with this sensor

I'm trying to create a UVI meter for my reptile lamp, to check the decrease of UVi in time and know when to replace them :)

I have 7 Arcadia T5 12% 54w UVB tube that should output 8.5 UVI at 30 cm from light source, they produce 7000K
Pro T5 Datasheet

Do you think this sensor could do the job ?

Thanks !

LTR390 incorrect readings when too much light

Hi,

Today I received my LTR390 sensor. I bought a Waveshare LTR390 from Aliexpress (https://www.waveshare.com/uv-sensor-c.htm)
I have noticed that it can only read 5000lux at maximum. When that level is passed, it shows incorrect values like 400lux or 858987712lux.
I am using example from this library.
Does anyone experienced similar issue?

Example reading when shining a flashlight on a sensor. It should give ~10k lux reading:

UV Index: 0.01
Ambient Light Lux: 6221.00
UV Index: 0.01
Ambient Light Lux: 5885.20
UV Index: 0.01
Ambient Light Lux: 5989.40
UV Index: 0.01
Ambient Light Lux: 6245.00
UV Index: 0.01
Ambient Light Lux: 6510.60
UV Index: 0.01
Ambient Light Lux: 858988544.00
UV Index: 0.01
Ambient Light Lux: 858989120.00
UV Index: 0.02
Ambient Light Lux: 858989248.00
UV Index: 0.02
Ambient Light Lux: 858989376.00
UV Index: 0.02
Ambient Light Lux: 858989888.00
UV Index: 0.02

Max lux

On a sunny day I get a max lux of 52428 from the getlux call. Any idea why.
I also get a very inconsistent uvi value. Even high as 8 on a normal day where the actual weather value is 3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.