To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcxOpen lugnet.robotics.rcx in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / 510
509  |  511
Subject: 
RE: RCX Temperature Algorithm
Newsgroups: 
lugnet.robotics.rcx
Date: 
Thu, 16 Mar 2000 14:06:05 GMT
Viewed: 
2042 times
  
Back when everybody was reverse engineering the RCX software, did anybody
figure out the code that is used to convert the a/d value into a
temperature?

Mike,

Here's the area of interest right out of Kekoa's listing from the
internals document...I don't have time to totally decode it, but
maybe if you put down your soldering iron... :-)

case a0: // temperature in degrees C
case c0: // temperature in degrees F
         if (raw >= 3a0 || raw < 122)
            sensor->value = 7fff
         else if (raw < 154)
            scale = fffffefb
            offset = 00023730
         else if (raw < 186)
            scale = ffffff3e
            offset = 0001e078
         else if (raw < 1de)
            scale = ffffff70
            offset = 0001944c
         else if (raw < 208)
            scale = ffffff85
            offset = 00016da0
         else if (raw < 316)
            scale = ffffff95
            offset = 00014cd0
         else if (raw < 376)
            scale = ffffff7a
            offset = 0001a068
         else
            scale = ffffff51
            offset = 00022d08
         temp = (raw * scale + offset) / 100
         if (sensor->mode & 0e == 0a)
            // temperature in degrees C
            sensor->value = temp
         else
            // temperature in degrees F
            sensor->value = degf = (temp * 12) / 0a + 140
         sensor->boolean = boolean


Hope this helps....

Cheers,

Ralph Hempel - P.Eng

--------------------------------------------------------
Check out pbFORTH for LEGO Mindstorms at:
<http://www.hempeldesigngroup.com/lego/pbFORTH>
--------------------------------------------------------
Reply to:      rhempel at bmts dot com
--------------------------------------------------------



Message is in Reply To:
  RCX Temperature Algorithm
 
Back when everybody was reverse engineering the RCX software, did anybody figure out the code that is used to convert the a/d value into a temperature? (25 years ago, 16-Mar-00, to lugnet.robotics.rcx)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR