Skip to content

Commit

Permalink
gpio stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Bastien Bron authored and Bastien Bron committed Sep 19, 2023
1 parent e600edb commit bc8a3b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion borne/gpio.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
// Retrieve pin 17 and configure it as an output pin
$pin = $gpio->getOutputPin(17);

if(!$_GET['on']){
if(isset($_GET['on'])){

// Set the value of the pin high (turn it on)
$pin->setValue(PinInterface::VALUE_HIGH);
echo "on";
}else{
// Set the value of the pin high (turn it on)
$pin->setValue(PinInterface::VALUE_LOW);
echo "off";
}

0 comments on commit bc8a3b9

Please sign in to comment.