write

Top  Previous  Next

The GPIO pins can be set to logic level 0 or 1.

Definition

result, error = raspi.write( pin, value )

 

Name

Type

Description

pin

number

The pin number

value

number

0 or 1.

result

nil or true

Returns true if success or nil + error on error.

error

nil or string

The error string if applicable.

 

Example

print(raspi.write( 24, 1 ))

Availability

Lua only on Raspberry Pi