temperature sensor C code?

C, C++, and Visual C++
cizzi
Phidgeteer!
Posts: 51
Joined: Mon Apr 16, 2007 10:33 am
Contact:

temperature sensor C code?

Postby cizzi » Thu Jul 02, 2009 11:41 am

has someone written C code for linux or any C code for the temperature sensor from phidgets? i'd like to see what it looks like and cant find it on the site

User avatar
Patrick
Lead Developer
Posts: 3056
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: temperature sensor C code?

Postby Patrick » Thu Jul 02, 2009 12:02 pm

The C examples on the programming page are written for Linux. To get temperature from the temperature sensor, you would just have to implement the formula in the temperature sensor manual.

-Patrick

cizzi
Phidgeteer!
Posts: 51
Joined: Mon Apr 16, 2007 10:33 am
Contact:

Re: temperature sensor C code?

Postby cizzi » Thu Jul 02, 2009 12:14 pm

I made a typo.. I am looking for C code for the voltage sensor.. my guess is I can use the temperature sensor C code and it will work just as well? by reading the code it looks like it takes the raw value from the analog sensor and brings it into the C program of which I would simply apply the formula to get the voltage.. am I right?

User avatar
Patrick
Lead Developer
Posts: 3056
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: temperature sensor C code?

Postby Patrick » Thu Jul 02, 2009 12:26 pm

Yes that's right - we just provide a simple InterfaceKit example that can be applied to all sensors.

-Patrick

ninka

Re: temperature sensor C code?

Postby ninka » Tue Aug 04, 2009 11:00 am

Hi All

I am new to phidgets and would like to read the temperature sensor data in a simple c/c++ program under Windows.. I have tried to integrate the code from TemperatureSensor-simple.c (I got from the page of the interface kit 8/8/8) but I have lots of errors .. like:

wrong number of arguments specified for `deprecated' attribute|

coming from the phidgets21.h file

Could u give me a top how I can proceed?

Thanks in advance

Ninka

User avatar
Patrick
Lead Developer
Posts: 3056
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: temperature sensor C code?

Postby Patrick » Tue Aug 04, 2009 12:40 pm

What compiler are you using? You may need to go through the .h file and delete all of the deprecated declarations.

-Patrick


Return to “C/C++”

Who is online

Users browsing this forum: No registered users and 2 guests