New libs forDS2450 and DS2413

Hi

I’m writing libraries for maxim’s quad ADC and dual-Channel Addressable Switch.
They are not finished in 100% (no examples and keywords etc) but they work :slight_smile:

In ds2450 library I used fragments of code from Peter H Anderson http://www.phanderson.com/arduino/ds2450_1.html

using:

ds2413:

ds2413.addres(13addr);//configure the ds2413 address

//READ PINS STATES
byte a,b,c;
ds2413.digitalWrite(0,0);//sometimes they “hang” in high state
ds2413.digitalRead(a,b);
Serial.println(“ds2413 A&B pins state”);
Serial.println(a , BIN);
Serial.println(b, BIN);

//Write Pins

ds2413.digitalWrite(1,1);
delay(500);
ds2413.digitalWrite(0,1);
delay(500);

DS2450:

set address ds2450.addr[8]

ds2450.getValues();
Serial.println("ds2450 Channels: ");
Serial.println(ds2450.A, DEC);
Serial.println(ds2450.B, DEC);
Serial.println(ds2450.C, DEC);
Serial.println(ds2450.D, DEC);

Also I want to thanks the Maxim Integrated Products, Inc. for supplying samples.

If You find any bug or if You have any suggestion please write to me :slight_smile:

libraries.zip (2.21 KB)

Useful. Thanks for sharing.

Czesc Michal! Could you help me with my project, pls? I have trouble to read multiple ds2413 pin state on 1-wire. Dzienky!