Centigrade to F conversion
Archiver
Posts: 46,084
Hi All,
I am making a device for a friend using a SHT11 sensor. He can't deal with
centigrade, so I have to convert it into degrees F. Tracy's site has a F to
C conversion, but no C to F. I know I should be able to switch it, but I am
simply too dim to do it. .1of a degree C would be fine resolution.
Thanks for any and all help!
Jonathan
www.madlabs.info
I am making a device for a friend using a SHT11 sensor. He can't deal with
centigrade, so I have to convert it into degrees F. Tracy's site has a F to
C conversion, but no C to F. I know I should be able to switch it, but I am
simply too dim to do it. .1of a degree C would be fine resolution.
Thanks for any and all help!
Jonathan
www.madlabs.info
Comments
--- In basicstamps@yahoogroups.com, "Jonathan Peakall"
<jpeakall@m...> wrote:
> Hi All,
>
> I am making a device for a friend using a SHT11 sensor. He can't
deal with
> centigrade, so I have to convert it into degrees F. Tracy's site
has a F to
> C conversion, but no C to F. I know I should be able to switch it,
but I am
> simply too dim to do it. .1of a degree C would be fine resolution.
>
> Thanks for any and all help!
>
> Jonathan
>
> www.madlabs.info
Here are the formulas:
°C =(°F - 32) / 1.8
and
°F = (°C x 1.8) + 32
Have fun,
Aaron
Original Message
From: Jonathan Peakall [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=_gO_LPv-B5QSshGsGcxbK0Lw_K-O3XmrCWscSyDsnJHN8nNPepOdEH1uTFOyIu0LxfPrNJWqv6r20tTk]jpeakall@m...[/url
Sent: Sunday, March 30, 2003 10:47 AM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Centigrade to F conversion
Hi All,
I am making a device for a friend using a SHT11 sensor. He can't deal
with centigrade, so I have to convert it into degrees F. Tracy's site
has a F to C conversion, but no C to F. I know I should be able to
switch it, but I am simply too dim to do it. .1of a degree C would be
fine resolution.
Thanks for any and all help!
Jonathan
www.madlabs.info
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
>
>I am making a device for a friend using a SHT11 sensor. He can't deal
>with centigrade, so I have to convert it into degrees F. Tracy's site
>has a F to C conversion, but no C to F. I know I should be able to
>switch it, but I am simply too dim to do it. .1of a degree C would be
>fine resolution.
>Thanks for any and all help!
>Jonathan
>www.madlabs.info
Hi Jonathan,
If you are using the programs I posted for the SHTxx, then
temperature will come out in tenths of a degree Celsius. E.g., 205
for 20.5 degrees C.
You can use the formula F= C *9/5+32, adjusted for tenths:
degC=205 ' example 20.5 degrees C input
degF=degC*9/5+320 ' degF and degC in tenths of degrees
debug dec degF/10,".",dec1 degF ' displays 68.9 degrees F output
Caveat, the programs have to be modified if you expect Celsius
temperatures less than zero....
' if temperatures can be less than zero...
degC=-205 ' example -20.5 degrees C input (word)
sign=degC.bit15 ' bit variable
degF=-sign^(abs degC*9/5)+320 ' degF and degC in tenths of degrees
sign=degF.bit15
debug rep "-"\sign,dec abs degF/10,".",dec1 abs degF
' displays -4.9 degrees F output
-- Tracy
electronically monitored ecosystems
http://www.emesystems.com
mailto:tracy@e...
C = (F-32)*5/9
On Sun, 30 Mar 2003, Jonathan Peakall wrote:
> Hi All,
>
> I am making a device for a friend using a SHT11 sensor. He can't deal with
> centigrade, so I have to convert it into degrees F. Tracy's site has a F to
> C conversion, but no C to F. I know I should be able to switch it, but I am
> simply too dim to do it. .1of a degree C would be fine resolution.
>
> Thanks for any and all help!
>
> Jonathan
>
> www.madlabs.info
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and Body
of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
Sean T. Lamont, CTO / Chief NetNerd, Abstract Software, Inc. (ServNet)
Seattle - Bellingham - Vancouver - Portland - Everett - Tacoma - Bremerton
email: lamont@a... WWW: http://www.serv.net
"Do not fear mistakes, There Are None" - Miles Davis