forked from fablabbcn/DS2482-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
38 lines (28 loc) · 883 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
This is a GPLd code produced by Paeae Technologies. Usually the code is suitable for Arduino platforms
if not specified otherwise.
Arduino library for controlling DS2482-100 and DS2482-800 1-wire masters.
Uses Wire library to communicate with DS2482 so be sure to call Wire.begin() before using the library.
Quick example modeled after Onewire example:
DS2482 ds(0);
void setup()
{
Wire.begin();
ds.reset();
//configure DS2482 to use active pull-up instead of pull-up resistor
//configure returns 0 if it cannot find DS2482 connected
//if (!ds.configure(DS2482_CONFIG_APU))
//{
// Serial.print("DS2482 not found\n");
//}
}
void loop()
{
byte addr[8];
if ( !ds.wireSearch(addr))
{
//Serial.print("No more addresses.\n");
ds.wireResetSearch();
return;
}
}
Note: Forked from https://github.com/paeaetech/paeae and customized for the SCK 1.5