led_in()


Reading the value of designated LED port

Description

void led_in(int $pin)

Parameters

Return Value

Returns 1 when the port state is HIGH, 0 when the port state is LOW

Example

<?php
include "/lib/sd_101.php";
led_setup(LED_A, "in");   // Setting the LED_A to input
$state = led_in(LED_A);   // Reading the LED_A
?>

See also