Uploaded January 2026 | Updated November 2026, 4 minutes ago
Playlist of other Pico videos and projects:
youtube.com/playlist?list=PLg0AM98jT164MVVE-rteHEckIC0YDIwmS
In this Raspberry Pi Pico 2 project video tutoria, I'll teach you how you can use an ambient light sensor with a Raspberry Pi Pico 2 microcontroller and MicroPython. This simple project will get the current light level and then turn on the Pico 2's onboard LED when the light is low.
This project will also work on the original Pico.
You can expand on this to do some home automation actions, such as activate an automation on Home Assistant to turn on or off a smart light or smart power socket for example.
I'll be using VS Code as my code editor but you can follow along if you use Thonny instead.
Timestamps:
00:00 Introduction
00:18 What You'll Need
01:12 Connecting Everything Together
01:56 Building the Code
07:23 Wrap Up
Link to the source code on GitHub:
github.com/York13Pud/pico-code-samples/tree/main/006-light-sensor
Link to the blog post:
dev.to/dev_neil_a/how-to-use-a-raspberry-pi-pico-2-with-a-light-sensor-3p6d
Links to the hardware used:
Pico 2 W:
thepihut.com/products/raspberry-pi-pico-2-w?variant=54063378760065
USB-C to Micro-B Cable:
thepihut.com/products/usb-c-to-micro-usb-cable-black
USB-A to Micro-B Cable:
thepihut.com/products/usb-to-micro-usb-cable-0-5m
Breadboard:
thepihut.com/products/breadboard-for-pico
Adafruit VEML7700 Sensor:
thepihut.com/products/adafruit-right-angle-veml7700-lux-sensor-i2c-light-sensor-stemma-qt-qwiic?variant=41513525444803
Dupont Male-to-Male Cables:
thepihut.com/products/thepihuts-jumper-bumper-pack-120pcs-dupont-wire
STEMMA QT / Qwiic JST-SH 4-pin to 4 Male Dupont Wires:
thepihut.com/products/stemma-qt-qwiic-jst-sh-4-pin-to-premium-male-headers-cable?variant=19932905209918
#python #coding #tutorial #programming #howto #pico2 #pico #raspberrypi #project #guide #microcontroller
Playlist of other Pico videos and projects:
youtube.com/playlist?list=PLg0AM98jT164MVVE-rteHEckIC0YDIwmS
In this Raspberry Pi Pico 2 project video tutoria, I'll teach you how you can use an ambient light sensor with a Raspberry Pi Pico 2 microcontroller and MicroPython. This simple project will get the current light level and then turn on the Pico 2's onboard LED when the light is low.
This project will also work on the original Pico.
You can expand on this to do some home automation actions, such as activate an automation on Home Assistant to turn on or off a smart light or smart power socket for example.
I'll be using VS Code as my code editor but you can follow along if you use Thonny instead.
Timestamps:
00:00 Introduction
00:18 What You'll Need
01:12 Connecting Everything Together
01:56 Building the Code
07:23 Wrap Up
Link to the source code on GitHub:
github.com/York13Pud/pico-code-samples/tree/main/006-light-sensor
Link to the blog post:
dev.to/dev_neil_a/how-to-use-a-raspberry-pi-pico-2-with-a-light-sensor-3p6d
Links to the hardware used:
Pico 2 W:
thepihut.com/products/raspberry-pi-pico-2-w?variant=54063378760065
USB-C to Micro-B Cable:
thepihut.com/products/usb-c-to-micro-usb-cable-black
USB-A to Micro-B Cable:
thepihut.com/products/usb-to-micro-usb-cable-0-5m
Breadboard:
thepihut.com/products/breadboard-for-pico
Adafruit VEML7700 Sensor:
thepihut.com/products/adafruit-right-angle-veml7700-lux-sensor-i2c-light-sensor-stemma-qt-qwiic?variant=41513525444803
Dupont Male-to-Male Cables:
thepihut.com/products/thepihuts-jumper-bumper-pack-120pcs-dupont-wire
STEMMA QT / Qwiic JST-SH 4-pin to 4 Male Dupont Wires:
thepihut.com/products/stemma-qt-qwiic-jst-sh-4-pin-to-premium-male-headers-cable?variant=19932905209918
#python #coding #tutorial #programming #howto #pico2 #pico #raspberrypi #project #guide #microcontroller









![Python Example: Subtract Values Between Two Counter Objects [How To]
in this Python code example, Ill show you how to use the collections library that is built-in to Python to subtract values between two counter objects.
This is video in a series that goes over some code examples of how to use one of the built-in Python standard libraries.
Remember to like, subscribe and hit the notification bell to get notified when my next video is out.
#python #coding #programming #beginners Python Example: Subtract Values Between Two Counter Objects [How To]](https://i.ytimg.com/vi/JBFWcibdl2U/mqdefault.jpg)
