Basic coding — Raspberry Pi Pico W simulation

An interactive Raspberry Pi Pico W circuit simulation you can run free in your browser on Velxio, by rock-with-technology1412.

Components

Sketch code

from machine import ADC, Pin
from time import sleep

# Initialize ADC on GP26 (Pin 26)
soil_sensor = ADC(Pin(26))

while True:
    raw_data = soil_sensor.read_u16()
    print(raw_data)
    sleep(1)  # Pauses for 1 second between reads

More projects by rock-with-technology1412