Raspberry Pi Pico practice problem · Raspberry Pi Pico
Line sensor → LED
MediumBudget $10MicroPython
A line-tracking sensor has its OUT on GP16, with VCC on 3V3 and GND. Its comparator output is HIGH over a dark line and LOW over a light surface. A red LED is on GP13.
Make the LED on while the sensor is over the line and off otherwise. The test starts on a light surface and moves a line under the sensor at 1 s.