Arduino 1-Wire Device Libraries
The Dallas-Maxim DS2450 is a quad analog-to-digital converter. This library only supports using this device in 4-channel, 5v range mode. See the Dallas-Maxim DS2450 datasheet for more information about this device and its capabilities.
To use this library in a sketch,
- Include the OneWire.h and DS2450.h header files.
- Call the ds2450.begin() method in the setup() method of the sketch. The begin() method returns True if the setup succeeded.
- Then, whenever voltage values are required, call the ds2450.update() method.
- Call the ds2450.isError() method to determine if the update succeeded.
- And, if successful, call the ds2450.getVoltage(channel) method to return the voltage value for the specified channel in volts (0-5v).
Like the other device libraries in this collection, there is also a getTimestamp() method that returns the value of the Arduino millis() function at the time the ds2450.update() method was called. This can be useful to compute elapsed milliseconds between subsequent updates.
The example demonstrates the use of this library to continuously read all 4 a/d channels of the DS2450 and print the values to the serial port.