Firmware · GPIO in practice
An LED can be lit by a pin that supplies current or one that sinks it, and the code has to match the wiring.