OneWire Class in the Reference.

Espruino's 1-Wire API is designed to be similar to Arduino's OneWire library. Simply instantiate it with the pin to use, search for devices, and start communicating:

var ow = new OneWire(pin); 
device =[0]; // search returns an array of device IDs
if (device===undefined) print("No OneWire devices found");
var result =

Note: OneWire devices need a 4.7kOhm pullup resistor on the data line in order to work correctly.

For examples of use, look in the source code for libraries that use OneWire...


DS18B20 Temperature SensorDS18B20 Temperature SensorDS2xxx OneWire EEPROMs (DS24B33, DS2431, DS28EC20 etc)DS2xxx OneWire EEPROMs (DS24B33, DS2431, DS28EC20 etc)OneWireTempManagerOneWireTempManager

This page is auto-generated from GitHub. If you see any mistakes or have suggestions, please let us know.