














# Replace 'embed' with the username you set in the Imager. Use the hostname,
# or the IP address if .local name resolution does not work on your network.
ssh embed@raspberrypi.local
# or, by IP:
ssh embed@172.23.1.100# On the Pi (over SSH), open the configuration tool:
sudo raspi-config
# Then: Interface Options -> VNC -> Yes -> Finishsudo apt update
sudo apt full-upgrade -y
sudo reboot# blink.py - blink an LED on GPIO17 (physical pin 11).
# Wiring: pin 11 -> 330 ohm resistor -> LED long leg (anode);
# LED short leg (cathode) -> pin 9 (GND).
from gpiozero import LED
from time import sleep
led = LED(17) # BCM numbering: GPIO17
while True:
led.on()
sleep(1)
led.off()
sleep(1)# nightlight.py - turn the LED on when it gets dark.
# LDR + capacitor on GPIO4; LED on GPIO17 as wired above.
from gpiozero import LightSensor, LED
ldr = LightSensor(4) # GPIO4
led = LED(17)
while True:
ldr.wait_for_dark()
led.on()
ldr.wait_for_light()
led.off()