I'm using the HA7Net bus master to extract the hex values but then I'm stuck.
Have received help from Embedded to confirm I'm getting correct values but I'm having a senior moment wrapping my head around developing a usable formula.
I get 1660 back from the DS2760 and am looking to translate this into something I can use with AppleScript or RealBasic
Where I fall down is how to apply the calculation when the value/binary changes:
How does the calculation vary in the 'power of' area?, I.e. the 179 has to change to something else.
Thanks in advance for any light you may be able to shed on this for me or links to visit you may be able to suggest.
I'm starting with the temp reading to get my feet wet and hoping that for the actual moisture sensing I will be able to apply what I learn during this initial quest.
Have received help from Embedded to confirm I'm getting correct values but I'm having a senior moment wrapping my head around developing a usable formula.
I get 1660 back from the DS2760 and am looking to translate this into something I can use with AppleScript or RealBasic
Code:
1660h = 0001 0110 0110 0000
0001 0110 0110 0000
(2^7)+(2^5)+(2^4)+(2^1)+(2^0)
128+32+16+2+1=179
179 (0.125 units) = 22.375C
Where I fall down is how to apply the calculation when the value/binary changes:
Code:
hex returned: 15C0
Converted to binary: 0001 0101 1100 0000
How does the calculation vary in the 'power of' area?, I.e. the 179 has to change to something else.
Thanks in advance for any light you may be able to shed on this for me or links to visit you may be able to suggest.
I'm starting with the temp reading to get my feet wet and hoping that for the actual moisture sensing I will be able to apply what I learn during this initial quest.