PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of András Zoltán-Gyárfás   PHP Raspberry PI DS18B20   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Raspberry PI DS18B20
Read values from RaspberryPI DS18B20 sensors
Author: By
Last change:
Date: 5 years ago
Size: 177 bytes
 

Contents

Class file image Download
<?php
require_once __DIR__ . '/vendor/autoload.php';
use
azolee\DS18B20;

$data = DS18B20::loadSensors();

header('Content-type: application/json');
echo
json_encode( $data );