Skip to main content

1Wire Sensor Library for Raspberry PI

Project description


pi1wire is a library for the Raspberry PI 1Wire sensor.

Quick Sample

Here is a simple usecase.

from pi1wire import Pi1Wire

for s in Pi1Wire().find_all_sensors():
    print('%s = %.2f' % (s.mac_address, s.get_temperature()))

OS Environment

(For Raspbian OS) Enable 1wire in raspi-config.

$ sudo raspi-config nonint do_onewire 0



This is a class that looks for sensors.

find_all_sensors() -> List[OneWire]

Get a list of OneWire instances.

find(mac_address: str) -> OneWire

Get a OneWire instance of the specified MAC address.


This class controls the sensors.


The MAC address property of the sensor.

get_temperature() -> float

Get the temperature.

Change Log


Initial release.



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pi1wire, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size pi1wire-0.1.0-py3-none-any.whl (5.2 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page