|Top Previous Next|
The onewire table supplies support for the Maxim Integrated line of 1-Wire hardware. The support here is built with the 1-Wire public domain kit as such you can find example on how to use these function by following the examples in the kit. This is most definitely an advanced topic.
Opening a 1-Wire connection
The first examples shows how to open a 1-Wire connection using a DS2490 ( USB connected 1-Wire hardware )
Once this script runs a global variable called portnum will be set. This is your key to using the rest of the onewire functions.
Listing 1-Wire devices
This code prints a list of serial numbers of connected 1-Wire devices.
The code below reads the temperature of the 1-Wire device with serial number DA000802A0AB5410.
While 1-Wire doesn't directly support humidity measurements there is hardware out there that uses a DS2438 together with a humidity sensor hooked to it's A2D port. (For example the HT3-R1-A from Hobby Boards does this ).The formula below will provide you with humidity.