Show Posts
Pages: 1 2 [3] 4 5 ... 17
31  Forum 2005-2010 (read only) / Development / Re: Dallas Temperature Control Library released ;) on: December 19, 2009, 04:47:32 pm
Sadly I cannot edit old posts. If you take a look at the web page you'll notice the library has been upgraded many times of the last few months. Each version has a change log so you can see what has been upgraded since.

Worth a look over, I hope the Arduino guys can sort the forum. Sorry for the confusion smiley-wink
32  Forum 2005-2010 (read only) / Development / Re: Dallas Temperature Control Library released ;) on: December 19, 2009, 06:52:53 am
Nope, it supports up to 64 devices per pin if I recall correctly. I could even be more
33  Forum 2005-2010 (read only) / Development / Re: Dallas Temperature Control Library released ;) on: September 17, 2009, 08:08:23 am
Yes, thanks to James Whiddon the library can change precision and read temperatures as Rusty suggested.

You can grab the latest version (Aside from my wiki) here: http://download.milesburton.com/Arduino/MaximTemperature/DallasTemperature_250.zip
34  Forum 2005-2010 (read only) / Development / Re: Dallas Temperature Control Library released ;) on: August 30, 2009, 07:37:22 pm
Hi guys,

To those are have used the OneWire library - The TLC doesn't maintain the original code only a new branch.

Sadly I've not had time to look into the code changes which have been proposed - I know there's some problems with the S series of devices. Sadly I dont have one myself to test.

I'm happy for anyone to update the open source code and I'll commit it to my SVN repos.
35  Forum 2005-2010 (read only) / Development / Re: Dallas Temperature Control Library released ;) on: August 08, 2009, 06:57:32 pm
@Rusty

I didn't suggest you were "picking on" anyone.. I meant picked up on, ie you found some problems smiley-wink. I'm far to old for play ground talk.

I'm just refactoring the library now. In your post you mentioned

"Then again, the configuration register in the 18B20 should be consulted
earlier to determine which of the last four bits are needed and what
factor to multiply by before returning. The 1820 and 18s20 only require
a multiply of 0.5"

...are you referring to the result when the temperature reaches zero? iirc you need to include or discard the MSBs. Can you clarify what you mean?

Cheers
36  Forum 2005-2010 (read only) / Development / Re: Dallas Temperature Control Library released ;) on: August 07, 2009, 05:29:34 pm
Hey Rusty,

Much of the code was nothing more than a refactor of the existing "OneWire" library. I just cleaned it up and made it a little more flexible and "easy to use".

I'll take a look at the bits you picked up on and see if the code can be cleaned up.
37  Forum 2005-2010 (read only) / Development / Re: Dallas Temperature Control Library released ;) on: August 07, 2009, 02:27:24 pm
Ah I'll take a look. I've not touched it as of yet as I dont actually have that device to test.
38  Forum 2005-2010 (read only) / Development / Re: Dallas Temperature Control Library released ;) on: August 07, 2009, 01:33:48 pm
"DallasTemperature.cpp"

It was litrally a two token addition. Nothing major.
39  Forum 2005-2010 (read only) / Development / Re: Dallas Temperature Control Library released ;) on: August 07, 2009, 03:10:35 am
You've made your temperature variable within the scope of "main". You either need to put it as a global variable (stick it outside of all functions) or declare it in the loop() function. But that, ofcourse, will be continually reset and you may run into memory problems smiley
40  Forum 2005-2010 (read only) / Development / Re: Dallas Temperature Control Library released ;) on: August 01, 2009, 04:00:10 am
Just for you, I've upgraded the library to include support for negative temperatures...


You can access the download version 1.5.0 from here:
http://download.milesburton.com/Arduino/MaximTemperature/DallasTemperature_150Test.zip

You can use the same sketch above if you wish or use the included example (Which is essentually the same with the comment removed smiley-wink)
41  Forum 2005-2010 (read only) / Development / Re: Dallas Temperature Control Library released ;) on: August 01, 2009, 03:28:09 am
Hi Soulid,

good man!

As far as negative temperatures go. It's actually quite an easy modification. If I recall correctly, it DOES show negative temperatures but, deceptively, as unsigned integer so it's hard to tell.

I'll take a look later but the code change wouldn't take long.
42  Forum 2005-2010 (read only) / Development / Re: Dallas Temperature Control Library released ;) on: May 23, 2009, 07:13:24 am
Rar is nagware and is multiple platform - they do have a "paid" copy, not that I've ever used it. I have some promo copy from several years ago.

I'll put a zipped copy up either way.

As for negative numbers, I don't own a S series so I cannot be sure how that is handled (I was hoping for freeback). The B series converts the number depending on a signed bit; however, I have yet to make it actually negative (bug).

This library isn't designed to use more than one device on the wire. You could but I didn't see the need for "version 1".

Anyway, I'm happy to hear suggestions for a future variant.

43  Forum 2005-2010 (read only) / Development / Dallas Temperature Control Library released ;) on: May 22, 2009, 03:25:04 pm
Hey guys,

I've you have any of the following Dallas ICs then this library is for you.
* DS18B20
* DS18S20
* DS1820

It's very simple to use, simply create an instance of DallasTemperature and begin on a port of your choice smiley-wink

Quote
/*
      DallasTemperature.CPP -  Dallas Temperature Control Library 1.0.0
      Author: Miles Burton, <Removed for privacy>
      Copyright (c) 2009 Miles Burton All Rights Reserved

      This library is free software; you can redistribute it and/or
      modify it under the terms of the GNU Lesser General Public
      License as published by the Free Software Foundation; either
      version 2.1 of the License, or (at your option) any later version.

      This library is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      Lesser General Public License for more details.

      You should have received a copy of the GNU Lesser General Public
      License along with this library; if not, write to the Free Software
      Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

       This code has been derived from: http://www.arduino.cc/playground/Learning/OneWire. Unknown author, unknown date

      You will need a 4.7K Ohm Resistor to "pull-up" the 1-Wire data line. You may use any combination of resistors 5x1k etc.
      If you are using the DS18B20, ground pins 1 and 3. The centre pin is the data line '1-wire'.
      
      Devices supported:
      DS18B20
      DS18S20
      DS1820
      
      You may extend this functionality through strategies. Please post on Arduino.cc and contribute to the project
      
*/

#include <DallasTemperature.h>

DallasTemperature tempSensor; // You may instantiate as many copies as you require.

void setup(void) {
  // initialize inputs/outputs
  // start serial port
  Serial.begin(9600);
  tempSensor.begin(12); // Data wire is plugged into port 12 on the Arduino
  Serial.println("Dallas Temperature IC Control Library 1.0. Miles Burton");
}


void loop(void) {

    // Ask the library whether the device is valid
    switch(tempSensor.isValid())
    {
        case 1:
            Serial.println("Invalid CRC");
                  tempSensor.reset(); // Attempts to redetect IC
            return;
        case 2:
            Serial.println("Not a valid device");
                  tempSensor.reset(); // Attempts to redetect IC
            return;
    }

  // getTemperature returns a float. Please note, this will always be a positive number.
      
  Serial.print(tempSensor.getTemperature());
  Serial.print("C");
  Serial.println();
  Serial.print(DallasTemperature::toFahrenheit(tempSensor.getTemperature())); // Use the inbuild Celcius to Fahrenheit conversion. Returns a float
  Serial.print("F");
  Serial.println();
}



Check out the wiki for more information.

If you've got any suggestions or spot any bugs, let me know!
44  Forum 2005-2010 (read only) / Development / Re: URM37 Ultrasonic Distance Measurer Library on: May 02, 2009, 09:30:01 am
For a full explanation of the library and it's functionality, please visit my Wiki

You can now fetch the latest stable version from

URM37 Library 1.0

This now include the temperature measurement functionality.

Again, it's very simple to use. There's been quite a few changes throughout the code; however, the end user should only need to be concern with the following:

You call requestMeasurement(DistanceType); Where DistanceType is an integer which represents the measurement type. I've provided serial definitions in the example code which allows you to use DISTANCE & TEMPERATURE.

When you getMeasurement pass the variable which will contain the measurement as an argument. For example: getMeasurement(theDistance).

As the library now supports more than one measurement type, you can use a switch (per my provided example) which allows you to process the measument dependant on type. For example:

switch(getMeasurement(theDistance))
{
case DISTANCE: (The definition at the top of the example)
   DoSomethingWith(theDistance);
break;
...
}

That's it! A little more complicated than the first version but allows more flexibility.

Let me know if you spot any problems.

Final comments:
You thoeretically can send multiple commands to the device. These will queue up within the arduino and URM37 buffers. I'd avoid sending multiple types until you get a response otherwise you may run into some unexpected errors. (...basically I've not tried it)

Temperate: You can request this as much as you like. It is more or less instant. Don't forget to remember, it probably wont change often is your ambient temperature is constant.

Distance: I found you can request distance VERY quickly. The response time is directly proportional the object in "view". In essence, the speed of sound (taking into account temperature) guides how quickly you will receive a response. Chances are you'll be using the URM within a small environment where all objects are within a few meters, consiquently, it'll take few ms to respond. - I'm planning to run some tests, if you have any information let me know.
45  Forum 2005-2010 (read only) / Development / Re: URM37 Ultrasonic Distance Measurer Library on: April 29, 2009, 05:41:54 pm
Interfacing with the tempreture sensor will be included soon.
Pages: 1 2 [3] 4 5 ... 17