Last active
June 23, 2018 18:54
-
-
Save ricardoreis/d24ab565ba08e1ad73d1ab1a4e54370b to your computer and use it in GitHub Desktop.
2.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
if(!isset($_SESSION['val'])){ | |
exec("gpio -g mode 18 pwm && gpio pwm-ms && gpio pwmc 192 && gpio pwmr 2000"); | |
} | |
function giraMotor(){ | |
exec('gpio -g pwm 18 60'); | |
} | |
giraMotor(); | |
?> | |
<html> | |
<p>Ok! PAGAMENTO RECEBIDO E MOTOR ACIONADO</p> | |
<script> | |
setTimeout(function(){window.location.href = "1.php";}, 1000); | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment