PHP Raspberry PI DS18B20: Read values from RaspberryPI DS18B20 sensors

Recommend this page to a friend!
  Info   Example   View files (10)   Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 147 All time: 8,878 This week: 306
Version License PHP version Categories
ds18b20 1.0MIT/X Consortium ...7.1Hardware, PHP 7
Description Author

This package can read values from RaspberryPI DS18B20 sensors.

It can read a Raspberry PI Linux system file that returns the list of a available sessions in a DS18B20 device.

The class can also read the values of each available sensor.

Innovation Award
PHP Programming Innovation award winner
February 2019

Prize: One year server license IP to country, region, city, latitude, longitude, ZIP code, time zone, area code database
RaspberryPI is a concept of small hardware boards that work as small computers connected to sensors that can collect data from the environment.

This package can read values from RaspberryPI DS18B20 sensors allowing to develop interesting applications that can act upon the values read from those sensors.

Manuel Lemos
Picture of András Zoltán-Gyárfás
Name: András Zoltán-Gyárfás is available for providing paid consulting. Contact András Zoltán-Gyárfás .
Classes: 4 packages by
Country: Romania Romania
Age: 40
All time rank: 185643 in Romania Romania
Week rank: 259 5 in Romania Romania
Innovation award
Innovation award
Nominee: 1x

Winner: 1x


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

File Role Description
src (1 directory)
tests (3 files)
composer.json Data Auxiliary data
index.php Example Example script Doc. Documentation

  Files  /  src  
File Role Description
azolee (1 file, 2 directories)

  Files  /  src  /  azolee  
File Role Description
Contracts (1 file)
DataFormat (2 files)
   DS18B20.php Class Class source

  Files  /  src  /  azolee  /  Contracts  
File Role Description
   SenzorDataProcessor.php Class Class source

  Files  /  src  /  azolee  /  DataFormat  
File Role Description
   CelsiusDataProcessor.php Class Class source
   FahrenheitDataProcessor.php Class Class source

  Files  /  tests  
File Role Description
   test.php Aux. Auxiliary script
   testCelsius.php Example Example script
   testFahrenheit.php Example Example script

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:8,878
This week:306

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