Pages: [1]   Go Down
Author Topic: Talking with different DS1820 temperature sensors  (Read 447 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 86
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I was trying the sample code to read the Dallas DS1820 and it seemed to be a bit confusing.
I was under the impression that the devices return their temperatures in a random order. Is it so ?
So I wrote a function that prepares a table of all the devices present (up to 3, all my samples) and then queries their temperatures one by one in the desired order.
Does this make sense to any of you ? Would you be intereseted in my code ? Or is it that I didn't understand the original example and all that wasn't needed ?
Thanks !
Logged

0
Offline Offline
Shannon Member
****
Karma: 161
Posts: 10431
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Each one-wire device has a unique ID - you just have to know which ID corresponds to which sensor, then it doesn't matter what order they identify themselves to the bus.
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
Let'S me no to test some code!
thx smiley-twist
Logged

Pages: [1]   Go Up
Jump to: