[SOLVED] Sensor VEML6030 on i2c

Hi all,
I’m struggling on getting a VEML6030 visible light sensor working on CubeCell AB02 with Arduino (I’m using the SparkFun library).

I have 3.3k pullups on i2c bus and indeed the device does respond on the 0x48 address (also i2cscan example does locate the sensor)

nevertheless when I try to set the gain/time or read value … I just get zero values.

I do initiate the bus with Wire.begin() … so I’m sure I’m talking to the right hw (it is the only sensor on i2c after all… and I also tested on the alternative addr 0x10 … same story)

I was wondering if someone already had experience with the VEML6030 on the CubeCell unit.


an update: I got the official module from sparkfun and I did hook up the module to my AB02 direclty (jumping wires on SDA/SCL, GND/VDD)

I have the exact same issue: I see the I2c location with i2cscanner but I can’t talk to the device.

someting does not work on the i2c bus of the AB02 with this sensor…


we have not do the adapt work for VEML6030 sensors.

could you provide your test code and the picture of the pin connected.

hi Jason,
this is the little breakout of the sensor

I’m using it “as is” simply attached to my AB02, with the same code example:

AFAIK it could be that if you are using a PSoC the I2C bus hw does require to support the CLOCK STRETCHING feature. If the slave device does not support clock stretching it wont work with cy hw (somehow I’ve seen some posts about going back to bit banging…)

could you please verify if this is the case?

if true this will be an issue with a lot of arduino I2C shields and sensors out there…

Hi Jason, did you had a chance to check the pics and the actual sparkfun module? this is a fairly popular light sensor… thanks!

Sorry to ask again Jason, any chance you can confirm the I2C issue? is clock stretching fully supported by the CubeCell (AB01 or AB02) ? because I can’t see any other reason this sensor won’t work on the CubeCell with this code (btw: it works on other Arduino board…)

Clock stretching worked not for me with an other sensor!


I think you can try 3 things
1)Cubecell TwoWire library, not Arduino Wire library. Since AB02 has 2 I2C.

  1. Some people report that cubecell I2c library have bug
    [SOLVED] Can't read I2C registers

  2. Slow down I2C clock

thanks ksckung!!

I simply added those 4 mods posted on:

and now the sensor works fine.

definetely something to be improved on the core lib for I2C…


we have updated this problem.

please git pull.

Hi Jason,
I just verified the updated Wire.cpp with the same setup and I can confirm that it does work.

thanks a lot for your support!