lukshio/ds18b20-multibus
Composer 安装命令:
composer require lukshio/ds18b20-multibus
包简介
The DS18B20 Sensor Multibus Handling PHP Package
README 文档
README
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(); var_dump($respone);
Read the raw data and process it:
use azolee\DS18B20; use azolee\DataFormat\{CelsiusDataProcessor, FahrenheitDataProcessor}; //in Celsius $celsiusDataProcessor = new CelsiusDataProcessor(); $celsiusDataProcessor->setPrecision(3); $respone = DS18B20::loadSensors($celsiusDataProcessor); var_dump($respone); // in Fahrenheit $fahrenheitDataProcessor = new FahrenheitDataProcessor(); $fahrenheitDataProcessor->setPrecision(0); DS18B20::setProcessor($fahrenheitDataProcessor); $respone = DS18B20::loadSensors(); var_dump($respone);
License: MIT
Author: ANDRAS Zoltan Gyarfas
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-08-01