[OpenTRV-dev] DS18B20 with Arduino

Damon Hart-Davis EMAIL ADDRESS HIDDEN
Thu Sep 19 20:16:46 BST 2013


Hi,

If you could knock out a minimal bit of code which does either or both of two things separately, and that you would be happy to put under an Apache licence for OpenTRV in the next week or two, the world would be a better place and I'd be very grateful (if not, no problem!):

 1) Detect if a DS18B20 is actually connected to a specified Arduino UNO digital pin.

 2) Read the temperature at maximum resolution from a DS18B20 connected to a specified Arduino UNO digital pin

In some mixture of C and asm.  Speed and beauty is not the be-all and end-all, and I can re-factor later.

Rgds

Damon



On 19 Sep 2013, at 12:26, Kevin Wood wrote:

> It seems that the code I used was derived from this:
> 
> http://www.siwawi.arubi.uni-kl.de/avr_projects/tempsensor/
> 
> There's no mention in the code or the web site of any license or
> permission under which it may be used, unfortunately. At the time, that
> didn't bother me, of course...
> 
> It's not that complex, and I have onewire devices, so I could attempt to
> "white room" myself and write something?
> 
> Kevin
> 
>> Thanks, that would be helpful!
>> 
>> Rgds
>> 
>> Damon
>> 
>> 
>> On 18 Sep 2013, at 19:25, Kevin Wood wrote:
>> 
>>> I've been using OneWire sensors with an AVR quite a bit. I'll have a
>>> look at where the code I used came from. Can't remember if it was
>>> home-made, pinched from somewhere or a combination thereof!
>>> 
>>> Kevin
>>> 
>>> On 18/09/13 18:09, Damon Hart-Davis wrote:
>>>> Hi,
>>>> 
>>>> Bo: following our earlier discussions
>>>> 
>>>> With a little research I think it should be possible to make the V0.2
>>>> work with DS (when running on 3.3V) or TMP, detected at run-time if
>>>> need be, though there are a number of trickinesses, especially with
>>>> timing because the DS is slow.
>>>> 
>>>> But I have not yet found a sensibly-licensed 1-Wire library for
>>>> Arduino/ATMega (ie *with* some sort of licence that isn't GPL and pref
>>>> is BSD or Apache or MIT or similar), so might have to reverse engineer
>>>> something.
>>>> 
>>>> In any case it's not a trivial bit of work, but not insurmountable
>>>> either.
>>>> 
>>>> Rgds
>>>> 
>>>> Damon
>>>> 
>>>> 
>>>> _______________________________________________
>>>> OpenTRV-dev mailing list
>>>> EMAIL ADDRESS HIDDEN
>>>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>>>> 
>>> _______________________________________________
>>> OpenTRV-dev mailing list
>>> EMAIL ADDRESS HIDDEN
>>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>>> 
>> 
>> _______________________________________________
>> OpenTRV-dev mailing list
>> EMAIL ADDRESS HIDDEN
>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>> 
> 
> 
> _______________________________________________
> OpenTRV-dev mailing list
> EMAIL ADDRESS HIDDEN
> http://lists.opentrv.org.uk/listinfo/opentrv-dev
> 



More information about the OpenTRV-dev mailing list