pinInput
Canonical ID: gpio.setInput. Nederlands: pinIngang.
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 GPIO input before sampling it. Virtual inputs start false and can be driven by the IDE workbench host. Physical Pi input samples the line through Linux GPIO character-device access. This is digital input; it does not add analog conversion, edge-event syntax, or an implicit pull-resistor API.
Signature
pinInput(pin)
Arguments
| Parameter | Type | Requirement |
|---|---|---|
pin |
Number | Whole BCM GPIO number 0–27; not the physical connector position. |
Return value
None.
Example
# language: en
pinInput(18)
say readPin(18)
Prints false on a fresh virtual input; physical input depends on the circuit.
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
pinOutput · writePin · readPin · Programming guides · Host support · Calls and arguments
