I wrote my own test app, and I'm able to receive sensor values from all my temperature sensors. So I'm still a little confused on what's wrong with it in RR.
My phidgets temp sensors don't seem to be outputting. I've set up the skin file as documented, and I have tried both PHIDT0 and PHIDT1 for the temp code for the port labelled 0 on the 8/8/8 interface. Any ideas?
Demo apps work fine.
Kevin
Audi A4 Carputer, 80% setup.
I wrote my own test app, and I'm able to receive sensor values from all my temperature sensors. So I'm still a little confused on what's wrong with it in RR.
Kevin
Audi A4 Carputer, 80% setup.
can you send me the code you made for your test app ?? all I did was follow the documentation on setting it up.. but I never did have the equip. to test it.. so I posted it was "not confirmed yet", but since you have your code working, if you let me look at it I can most definitely make sure it follows your logic..
Ride Runner RR's Myspace
"Being happy is not about having what you want, it's about wanting what you have."
"The best things in life are always free - but that doesn't mean money can't buy you good things."
Kevin,
can i also have the code you wrote..? i have the 4 temp sensor and i can't get it to work with RR. I downloaded the dos and win programs to test but they don't seem to run on XP?
anyone else using the 4 temp sensor? and is it working with RR?
andy
andy.morris at woodward dot edu
Guino, if there is anything I can do to help you on Phidgets just ask!!! My app is based on phidgets so I know something about it!!Originally Posted by guino
![]()
I use my home made temp. reader hardware type kit posted to Guino and my personal serial voltmeter hardware, 4 sensor DS18B20 and work all devices ok with RROriginally Posted by ajmorris
![]()
Mauri
Is this the KIT posted on the links section of my site ?? if so, have you tried it with Hyperterminal to see if it's outputting any data ?Originally Posted by ajmorris
Ride Runner RR's Myspace
"Being happy is not about having what you want, it's about wanting what you have."
"The best things in life are always free - but that doesn't mean money can't buy you good things."
Well, I'll paste the code, but keep in mind that it is for VJ#.NET as opposed to VC#.NET or VC++.NET. Although the beauty of VS.NET 2003 and up is that all the languages offer the same access to the .NET core and only syntax sets them apart (mostly).
This code loads my phidgets interface, with my specific serial number, and then looks for a temperature sensor and outputs the values:
Sample output:Code:PHIDGET.PhidgetInterfaceKitClass ik = new PHIDGET.PhidgetInterfaceKitClass(); ik.Open(false, 7252); System.out.println("DEBUG: PhidgetInterfaceKit: " + ik.get_DeviceType() + " " + ik.get_IsAttached() + " " + ik.get_DeviceVersion() + " " + ik.get_LibraryVersion() + " " + ik.get_NumSensors() + " " + ik.get_SerialNumber() + " " ); for (int i=0; i<1000; i++) { temp1c = (ik.get_SensorValue(0) - 200) / 4; temp1f = ((temp1c * 9) / 5) + 32; System.out.println("DEBUG: PhidgetInterfaceKit: Sensor 0 = " + temp1c + "C/" + temp1f + "F"); temp2c = (ik.get_SensorValue(1) - 200) / 4; temp2f = ((temp2c * 9) / 5) + 32; System.out.println("DEBUG: PhidgetInterfaceKit: Sensor 1 = " + temp2c + "C/" + temp2f + "F"); lTemp1.set_Text(temp1c + "/" + temp1f); lTemp2.set_Text(temp2c + "/" + temp2f); this.Update(); System.Threading.Thread.Sleep(250); }
DEBUG: PhidgetInterfaceKit: PhidgetInterfaceKit true 8.2 Phidget20 DLL Version 1.0.3
Phidget COM Library 2.0.6 8 7252
DEBUG: PhidgetInterfaceKit: Sensor 0 = 26.0C/78.8F
DEBUG: PhidgetInterfaceKit: Sensor 1 = 27.0C/80.6F
DEBUG: PhidgetInterfaceKit: Sensor 0 = 26.0C/78.8F
DEBUG: PhidgetInterfaceKit: Sensor 1 = 27.0C/80.6F
DEBUG: PhidgetInterfaceKit: Sensor 0 = 26.0C/78.8F
DEBUG: PhidgetInterfaceKit: Sensor 1 = 27.0C/80.6F
...
Notice there is no need to "calibrate" the sensors. Most of that is hogwash anyway. The sensors report a value in the hundreds, and it has to be convert ed to a proper degree in either Celsius or Farenheit, and the "calibration" is really just the "normalization" you can do (minimum and maximum normalization), mainly used to simplify the detection of changed degrees (in other words, you could set the minimum normalization to 300 if the current value was showing 300, and then you'd get a 0 value back, then in an increase temp environment, you could see the actual increase, rather than have to store and then calculate based on orig temp, it's useless in most environments I think)
Let me know if there's anything else I can do to help!
Kevin
Audi A4 Carputer, 80% setup.
Hold on there.. that doesn't seem anything like the PhidGet TEMPERATURE sensor interface I looked at.. the one I made support for is of a Class: PHIDGET.PhidgetTemperatureSensor and I use the Temperature(SENSOR) method to obtain it's temperature... it just seems like you're using a different Kit or board that wasn't meant for temperature... what's up with that ??
Ride Runner RR's Myspace
"Being happy is not about having what you want, it's about wanting what you have."
"The best things in life are always free - but that doesn't mean money can't buy you good things."
Well, the API is named differently under VJ# but it's just using the 2.0.x COM object anyway, so it's more or less the same thing.
I'm not loading the temperature sensor object. I could never get it working under the VJ# api the way I wanted to. So, the way I'm doing it is actually much cleaner, and better in my opinion.
Basically, I'm using PHIDGET.PhidgetInterfaceKitClass to talk to the 8/8/8 board (you could even use it for all the other boards), and calling the get_SensorValue() method (which is probably PhidgetInterfaceKit.SensorValue() in C# or C++). It lets me grab the value for ANY sensor, or input on the board, so it's not specific to just temperature sensors. Then, I convert the value to temp using the formula that Phidgets provided to do that (using Temperature = (SensorValue - 200)/4 as noted at http://www.phidgetsusa.com/viewproduct.asp?SKU=1114).
In a much larger scale application that does autodetection, this would not work so well (i.e. to determine which port temp sensors are on, etc), but since we are specifying which phidget device port we're using in the skin, this method would work very well. Although, notice I'm specifying the serial number of the phidgets interface kit directly in my code (7252 I think it was) rather than detecting it. That is because your system could very well have multiple boards. Perhaps having that as an option in the skin would be nice as well, so you could specify specifically WHICH board your sensor was on...
For example, maybe something like:
L................."PHID:7252:T:0" "c2f"
to mean:
Phidgets, connect to kit with serial of 7252, temp sensor, port 0
Also, you are ignoring the COM PORT field setting if using Phidgets right?
Kevin
Audi A4 Carputer, 80% setup.
Bookmarks