By huguesdecourson
#41280
Hi,

I'm working on a project of a datalogger with multi-sensor.

Actually I have :

- A DFRduino UNO V3 with an expansion shield v7
- A RTC module (SD2405) connected in I2C
- The Gravity I2C VEML 7700 sensor also connected in I2C

After I will add :

- A temperature sensor
- An analogic ambient sound sensor
- A SD card to record all the data in a csv file.

I teste all sensor one by one and everything is working fine except for the Gravity I2C VEML 7700.

I used the code provided in the wiki but it is returning "0 lux" even if I change luminosity.
The device is welle recognized on the I2C (controlled by using a I2C scan) and I didn't noticed any other bug (except bug for downloading the sketch which looks very common).

Can I you please help me ? Have I a way to know if the sensor is not broken ?

Thanks a lot in advance for you answer.

Regards
By nana.wang
#41352
Hi, we have tested this problem with a normal module and a broken module. The normal one print is alright, once the brightness changes, the read data changes too. While the broken one prints Lux:ovf lx. We are sorry for the inconvenience caused.
You can check the warranty in DFRobot for more details related to Refund/Return Policy. You can also contact us via e-mail address in the Contacts page.
Thank you for your support!
#42209
Hi, thank you for your answer.
As you said the error was related to a broken sensor I tried to buy a new one. But the issue is stil remaining ... I think it is related to the library but I'm not able to found the coding error. Maybe you have an idea ?
Thank you in advance for your answer.
Regards
By nana.wang
#42242
So sorry for all inconvenience caused.
We found the library is alright, but the code in the wiki page is wrong.
Code: Select all
/*!
 * @file readVEML770.ino
 * @brief DFRobot's Digital Ambient Light Sensor
 * @n This example read the Lux from Digital Ambient Light Sensor, and then print them
 *
 * @copyright	[DFRobot](http://www.dfrobot.com), 2016
 * @copyright	GNU Lesser General Public License
 *
 * @version  V1.0
 * @date  2016-12-06
 */


#include <Wire.h>
#include "DFRobot_VEML7700.h"

DFRobot_VEML7700 als;

void setup()
{
  Serial.begin(9600);
  als.begin();
}

void loop()
{
  float lux;
  als.getALSLux(lux);
  Serial.print("Lux: ");//Read Lux and print
  Serial.print(lux);       
  Serial.println(" lx");
  delay(500);
}
Please try the code. And we are so sorry for the inconvenience caused.
We will inform the product manager and update the wiki ASAP.