Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 24 lines (18 sloc) 575 Bytes
#!/usr/bin/env php
<?php
require __DIR__.'/vendor/autoload.php';
use TemperaturePi\Logger;
/*
if('root' !== $_SERVER['USER'] || empty($_SERVER['SUDO_USER'])){
die("[ABORT] Please run this script as root\n");
}
*/
if(!file_exists('/sys/bus/w1/devices/28-000003ced8f4/w1_slave')) {
die("[ABORT] Please run: sudo modprobe w1-gpio; sudo modprobe w1-therm\n");
}
$log = new Logger;
$log->persist(true);
$log->writeJsDatas();
if(file_exists("./vendor/ronanguilloux/php-gpio/blinker")) {
$result = exec('sudo ./vendor/ronanguilloux/php-gpio/blinker 17 200000');
}
Something went wrong with that request. Please try again.