PiicoDev Ambient Light Sensor VEML6030 - Raspberry Pi Guide

Michael just shared a new tutorial: “PiicoDev Ambient Light Sensor VEML6030 - Raspberry Pi Guide”

This guide will help you read distance data from your PiicoDev® Distance Sensor and a Raspberry Pi single-board computer!

Read more


Using Windows 10 and Thonny you can connect via SSH to your Pi if you change the interpretor in Thonny to “Remote Python 3 (SSH)”. Useful if you are using a laptop and your Pi is powered on and connected to network with SSH.

  • Enable SSH service on your RPi
  • Install Thonny on your PC
  • Click on the interpreter button in the lower-right corner of Thonny’s main window
  • Select “Configure interpreter”
  • In the new window open interpreter dropdown and select “Remote Python 3 (SSH)”
  • Fill in the parameters and click OK

This is a great tip! Sounds like a snappier workflow than what I’m used to - enabling file sharing so I can edit the origin file on the Pi, and run scripts through the shell.


Copy and paste error in introduction: “This guide will help you read distance data from your PiicoDev® Distance Sensor and a Raspberry Pi single-board computer”

1 Like

When I try and install the piicodev package in Thonny, I get the following error:

Warning: micropython.org SSL certificate is not validated

Not sure what I can do about an invalid SSL cert on that site. Any ideas?



Is the time accurate on the device you are using? SSL will often fail if the date/time is wrong on the client device.


Thanks, Graham - I’ll check that.


Fixed - Thanks for the heads-up @Garry120673!


There’s also a typo with the pressure sensor guide for rpi - “This guide will help you read motion data from your PiicoDev® Motion Sensor with a Raspberry Pi single-board computer.” - motion should be pressure.


The on board LED affects the reading.

Cover the sensor results in 1 or 2 lux; cover the board results in something higher, dependant on the reflected light. The LED track was cut.

Readings are now much more relevant IMHO. Covering the board results in less than 1 lux.

Excellent tutorial. Excellent Python Library.


@Eric43534 Works like a ‘charm’, thanks for sharing this, did not know this was possible.
Will make my development much easier and faster.



Hi is there anyway to disable the onboard light via a command / software? This is on a rpi4. The reason being is that I want it to read colours from an LED on another device.

1 Like

Hi Sam,

Unfortunately not, the main IC doesn’t have a pin or anything to disable it so cutting the trace to the LED or use the holes on the bottom of the board.

1 Like

Hi @Sam150491 - disable the power LED by cutting this jumper:

You might also be interested in the PiicoDev Colour Sensor VEML6040 which is capable of differentiating different colours and light intensity.

Thanks Michael, I think I may have found a workaround (I didn’t say blu-tack :slight_smile: )

1 Like

:smile: that’ll do nicely

to be fair, I’ll give my context - I have fttp issues (gasp!) and sometimes the ONT shows an optical fault, this shows a red LED when fault occurs. In normal operations, this LED shows flashing green (which causes other trickery in terms of detecting the ‘colour’). Now, since my RSP/NBN refuse to come out to look at my line (only two years old now) I’m going to use this setup to gather the evidence to put my case to them. For your entertainment, I’m polling the VEML6040 (actually 6040 not the 6030) every second or so (I’m fine tuning the exact polling period to use best) using rpi4 running node-red executing python to return the hue from your piicodev libraries, and then charting the 7day history of green versus red LED from the ONT in node-red. All this would be much easier if the RSP/NBN actually allowed me to monitor their equipment, but no…


Oh it is a VEML6040. In that case you could have connected the LED pin to the GND pin to disable the LED :stuck_out_tongue:


This sounds like a great project :slight_smile: I’ve done something similar in the past with a Raspberry Pi running periodic speed tests.

We’d love to see your project in it’s own thread (this one is for questions about the VEML6030) or over on the projects page! :smiley: there could even be a store credit in there for ya :wink: