PHP Classes


Recommend this page to a friend!
  Classes of András Zoltán-Gyárfás  >  PHP Raspberry PI DS18B20  >  >  Download  
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP Raspberry PI DS18B20
Read values from RaspberryPI DS18B20 sensors
Author: By
Last change: Updated Readme
Date: 3 years ago
Size: 1,020 bytes


Class file image Download

A Simple DS18B20 Sensor Handling PHP Package

This package can be used to read the popular DS18B20 Sensor data from multiple sensors on a Raspberry PI.

Tested on Raspibian OS.

Note: Previously the Raspibian needs to be configured to handle the sensor.

Example usage (See _tests_ folder)

Read the raw data:

use azolee\DS18B20;

$respone =  DS18B20::loadSensors();


Read the raw data and process it:

use azolee\DS18B20;
use azolee\DataFormat\{CelsiusDataProcessor, FahrenheitDataProcessor};

//in Celsius
$celsiusDataProcessor = new CelsiusDataProcessor();

$respone =  DS18B20::loadSensors($celsiusDataProcessor);


// in Fahrenheit
$fahrenheitDataProcessor = new FahrenheitDataProcessor();


$respone =  DS18B20::loadSensors();


License: MIT

Author: ANDRAS Zoltan Gyarfas

For more information send a message to info at phpclasses dot org.