|
|
|
Junior Member
      
Group: Forum Members
Last Login: Thursday, April 03, 2008 8:22 PM
Posts: 16,
Visits: 24
|
|
| I have a TPA81 that reads usually 75-77 F (24-25C) in Robotics Studio service TPA81Service. However, if I poll the exact same sensor from a Windows Forms application using Serializer.Net call like this: lblTemp = tpa81[0].Temperature.ToString(); //get ambient temp the value I get returned is usually 56-57. If I heat the thing up, it goes up; if I cool it down, it goes down. So on a relative basis it seems to be working, but the value it is returning is clearly not Celsius or Fahrenheit. The same for all the other eight temp points. I know the sensor is working fine, because RoboticsStudio service is correctly reading the temps off it. Is my programmatic call above retrieving some kind of raw sensor reading that needs to be converted to F or C? (If so, what is the formula?) Or what might be going on here, any ideas? Thanks!
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: Monday, December 01, 2008 6:34 PM
Posts: 299,
Visits: 426
|
|
| Hmm... I just compared the src code between the .NET lib and the Serializer Services and they are using the same algorithm for calculating Fahrenheit. The only real difference I see is that the .NET lib is storing the value in a double, and the Serializer Services is storing it in an int. Dunno why I did that.  I have some CE stuff to do this weekend, but I will try to get to the bottom of this on Saturday. I'll post the results (if not before then). You might want to ensure you're setting the units to your desired value for the Serializer .NET Lib (in the CommunicationsStarted handler). Best Regards!
Jason Summerour President, Summerour Robotics Corporation Microsoft MVP www.roboticsconnection.com
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: Monday, December 01, 2008 6:34 PM
Posts: 299,
Visits: 426
|
|
Okay, I found the (order of operations) bug... It's in the Serializer .NET Lib.  I'll fix it tonight, and post a new release (which has another bug fix anyway). Thanks for pointing this out my friend! Best Regards!
Jason Summerour President, Summerour Robotics Corporation Microsoft MVP www.roboticsconnection.com
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: Monday, December 01, 2008 6:34 PM
Posts: 299,
Visits: 426
|
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: Thursday, April 03, 2008 8:22 PM
Posts: 16,
Visits: 24
|
|
| Jason, thanks for such a quick turn-around! I installed and tested the new version of the library you just posted, and it worked perfectly; the temperature readings are now displaying accurately on my labels. Thanks again!
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: Monday, December 01, 2008 6:34 PM
Posts: 299,
Visits: 426
|
|
You are welcome! I'm glad it was a quick fix, and that I could get it out for you asap.  Best Regards!
Jason Summerour President, Summerour Robotics Corporation Microsoft MVP www.roboticsconnection.com
|
|
|
|