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 bc8a3b9 commit baf881e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion borne/gpio.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// Retrieve pin 17 and configure it as an output pin
$pin = $gpio->getOutputPin(17);

if(isset($_GET['on'])){
if(isset($_GET['gpio']) && $_GET['gpio']=="on"){

// Set the value of the pin high (turn it on)
$pin->setValue(PinInterface::VALUE_HIGH);
Expand Down
2 changes: 1 addition & 1 deletion borne/index.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
session_start();
require_once 'gpio.php';
use Classes\Tube;
require_once 'autoloader.php';

if(!$_GET['init']){
session_destroy();
Expand Down

0 comments on commit baf881e

Please sign in to comment.