Has anyone attempted to retrieve the serial # from a DS18S20 I2C device? I don’t want to reinvent the wheel especially when there is better code out there.
DS18S20 is NOT a I2C device but a OneWire device.
Code can be found here: [url]http://code.tinyclr.com/project/157/onewire-temp-sensor-example-ds18b20/[/url] and [url]http://code.tinyclr.com/project/236/ds18b20-temp-sensor-with-async-events/[/url]
Look here for how to get the address (serial#): [url]http://www.tinyclr.com/forum/10/609/#/1/msg4662[/url]
Note that the only difference between a DS18S20 and a DS18B20 is the resolution.
Greetings
I looked at that code and there is not a method for retrieving the serial number.
This will print the address:
while (ow.Search_GetNextDevice(OW_address)
{
OW_number++;
for (i=0;i<8;i++) debug.print(OW_address[i]+":");
}
Thank you.That is much cleaner than the code that I wrote.