Auto search for All DS18B20 sensors on data bus

Dependencies:   mbed

Committer:
umairaftab
Date:
Sun Apr 13 10:06:52 2014 +0000
Revision:
0:a2a81f538133
Multiple Sensors Functionality Added to Peter Sudensikis Library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
umairaftab 0:a2a81f538133 1 /*
umairaftab 0:a2a81f538133 2 * DS18B20. Maxim DS18B20 One-Wire Thermometer.
umairaftab 0:a2a81f538133 3 * Uses the OneWireCRC library.
umairaftab 0:a2a81f538133 4 *
umairaftab 0:a2a81f538133 5 * Copyright (C) <2010> Petras Saduikis <petras@petras.co.uk>
umairaftab 0:a2a81f538133 6 *
umairaftab 0:a2a81f538133 7 * This file is part of OneWireThermometer.
umairaftab 0:a2a81f538133 8 *
umairaftab 0:a2a81f538133 9 * OneWireThermometer is free software: you can redistribute it and/or modify
umairaftab 0:a2a81f538133 10 * it under the terms of the GNU General Public License as published by
umairaftab 0:a2a81f538133 11 * the Free Software Foundation, either version 3 of the License, or
umairaftab 0:a2a81f538133 12 * (at your option) any later version.
umairaftab 0:a2a81f538133 13 *
umairaftab 0:a2a81f538133 14 * OneWireThermometer is distributed in the hope that it will be useful,
umairaftab 0:a2a81f538133 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
umairaftab 0:a2a81f538133 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
umairaftab 0:a2a81f538133 17 * GNU General Public License for more details.
umairaftab 0:a2a81f538133 18 *
umairaftab 0:a2a81f538133 19 * You should have received a copy of the GNU General Public License
umairaftab 0:a2a81f538133 20 * along with OneWireThermometer. If not, see <http://www.gnu.org/licenses/>.
umairaftab 0:a2a81f538133 21 */
umairaftab 0:a2a81f538133 22
umairaftab 0:a2a81f538133 23 #ifndef SNATCH59_DS18B20_H
umairaftab 0:a2a81f538133 24 #define SNATCH59_DS18B20_H
umairaftab 0:a2a81f538133 25
umairaftab 0:a2a81f538133 26 #include "OneWireThermometer.h"
umairaftab 0:a2a81f538133 27 #include "OneWireDefs.h"
umairaftab 0:a2a81f538133 28
umairaftab 0:a2a81f538133 29 class DS18B20 : public OneWireThermometer
umairaftab 0:a2a81f538133 30 {
umairaftab 0:a2a81f538133 31 public:
umairaftab 0:a2a81f538133 32 DS18B20( PinName pin);
umairaftab 0:a2a81f538133 33
umairaftab 0:a2a81f538133 34 virtual void setResolution(eResolution resln);
umairaftab 0:a2a81f538133 35
umairaftab 0:a2a81f538133 36 protected:
umairaftab 0:a2a81f538133 37 virtual float calculateTemperature(BYTE* data);
umairaftab 0:a2a81f538133 38 };
umairaftab 0:a2a81f538133 39
umairaftab 0:a2a81f538133 40
umairaftab 0:a2a81f538133 41 #endif