ArduinoGeneral

veml7700 problem with Arduino UNO Wifi Rev2

userHead Account cancelled 2019-04-24 05:42:01 4384 Views4 Replies
Hi.
I am using VEML7700 I2C ambient sensor from DFROBOT.
And I am handing new board "Arduino UNO Wifi Rev2" as main board.

Before new board, I used Arduino UNO board with VEML7700. It was fine.
But after changing main board, VEML7700 doesn't work.

First, when I compile, i got these messages below.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
In file included from C:\Program Files (x86)\Arduino\libraries\DFRobot_VEML7700-master\DFRobot_VEML7700.h:15:0,
from C:\Program Files (x86)\Arduino\libraries\DFRobot_VEML7700-master\DFRobot_VEML7700.cpp:14:
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.6.26\libraries\Wire\src/Wire.h: In member function 'uint8_t DFRobot_VEML7700::receiveData(uint8_t, uint32_t&)':
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.6.26\libraries\Wire\src/Wire.h:62:13: note: candidate 1: uint8_t TwoWire::requestFrom(int, int)
uint8_t requestFrom(int, int);
^
C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.6.26\libraries\Wire\src/Wire.h:60:13: note: candidate 2: virtual uint8_t TwoWire::requestFrom(uint8_t, size_t)
uint8_t requestFrom(uint8_t, size_t);
^
-----------------------------------------------------------------------------------------------------------------
But i fixed it with this change.
//if (Wire.requestFrom(uint8_t(I2C_ADDRESS), uint8_t(2)) != 2){
if (Wire.requestFrom(int(I2C_ADDRESS), int(2)) != 2){

Still, I can't get correct ambient lux value.
The value from sensor is all the same. The value itself isn't correct I think. Because my room lux value wasn't high.
----------------------------------------------------------------------
06:36:56.035 -> Lux:538.77 lx
06:36:56.243 -> Lux:538.77 lx
06:36:56.446 -> Lux:538.77 lx
06:36:56.650 -> Lux:538.77 lx
06:36:56.853 -> Lux:538.77 lx
06:36:57.057 -> Lux:538.77 lx
06:36:57.226 -> Lux:538.77 lx
06:36:57.430 -> Lux:538.77 lx
06:36:57.635 -> Lux:538.77 lx
06:36:57.838 -> Lux:538.77 lx
06:36:58.038 -> Lux:538.77 lx
06:36:58.242 -> Lux:538.77 lx
06:36:58.445 -> Lux:538.77 lx
06:36:58.648 -> Lux:538.77 lx
06:36:58.851 -> Lux:538.77 lx
06:36:59.053 -> Lux:538.77 lx
06:36:59.257 -> Lux:538.77 lx
06:36:59.460 -> Lux:538.77 lx
06:36:59.664 -> Lux:538.77 lx
06:36:59.867 -> Lux:538.77 lx
06:37:00.070 -> Lux:538.77 lx
06:37:00.271 -> Lux:538.77 lx
06:37:00.474 -> Lux:538.77 lx
06:37:00.677 -> Lux:538.77 lx
06:37:00.881 -> Lux:538.77 lx
06:37:01.082 -> Lux:538.77 lx
06:37:01.283 -> Lux:538.77 lx
06:37:01.486 -> Lux:538.77 lx
06:37:01.687 -> Lux:538.77 lx
------------------------------------------------------------------------------------

Could you help me?
2020-03-22 03:56:03 Hey, I bought the VEML7700 recently as well and tried hooking it up to the Arduino Wifi Rev2 and have the same issue. I noticed that the light sensor is meant to be hooked up to the SCL/SDA ports so I tried hooking them up, but still did not help. userHeadPic Bohrer Jeremy
2019-05-17 14:31:49 Did you test it when sai in the sun? how about the data?
It should be about 100 0000, if not, pls contact [email protected],com for RAM.
userHeadPic techsupport