pinOutput
Canonical ID: gpio.setOutput. Nederlands: pinUitgang.
A pin is a connection for a signal. GPIO means general-purpose input/output; BCM is the GPIO numbering scheme, not the order of pins on the connector. In the interpreter and browser these pins are virtual, with pretend states stored by Pliro. Only an explicit native Raspberry Pi target accesses physical pins. Configure means choose input or output before using a pin. See GPIO and circuit words.
Configures a pin for Boolean output and resets its logical output to false. A physical native output starts safely low. Writing before configuration is invalid. On the interpreter and browser this changes isolated virtual state; only explicit Raspberry Pi native targets operate physical GPIO.
Signature
pinOutput(pin)
Arguments
| Parameter | Type | Requirement |
|---|---|---|
pin |
Number | Whole BCM GPIO number 0–27; not the physical connector position. |
Return value
None.
Example
# language: en
pinOutput(17)
say readPin(17)
writePin(17, true)
say readPin(17)
Prints false then true.
Notes and common mistakes
Use the function name for your source language. Its canonical ID is a shared documentation label; you do not type that ID as a call. Giving your own variable or function the same name can hide the built-in. Supply the documented arguments and value types. Pliro reports mismatches when checking can detect them, or when the call runs.
BCM numbers differ from physical header positions. Test in the virtual workbench before a physical Pi export. Follow the board manufacturer’s electrical guidance for resistors, pull-ups/pull-downs, and voltage levels. Missing physical capability or line access is reported as a diagnostic; an entitlement is not permission to access hardware.
Related entries
pinInput · writePin · readPin · Programming guides · Host support · Calls and arguments
