Using the Sensor API
In this lesson, you will learn how to use the application programming interface (API) to find methods and events that are specific to your Phidget.

APIs
Every Phidget has an API that provides information about all of the methods and events available to that Phidget. An API is like a reference library for a computer programmer, if you are not sure how to change a setting or access a piece of information, the API is the first place to check.
Note: the API below assumes you have an understanding of the following topics:
APIs
Every Phidget has an API that provides information about all of the methods and events available to that Phidget. An API is like a reference library for a computer programmer, if you are not sure how to change a setting or access a piece of information, the API is the first place to check.
Note: the API below assumes you have an understanding of the following topics:
APIs
Every Phidget has an API that provides information about all of the methods and events available to that Phidget. An API is like a reference library for a computer programmer, if you are not sure how to change a setting or access a piece of information, the API is the first place to check.
Note: the API below assumes you have an understanding of the following topics:
APIs
Every Phidget has an API that provides information about all of the methods and events available to that Phidget. An API is like a reference library for a computer programmer, if you are not sure how to change a setting or access a piece of information, the API is the first place to check.
Note: the API below assumes you have an understanding of Closing Phidgets.
Humidity Phidget API
Watch the video below for information on how to use the API.
API
Exploring the API
Finding a Device's API
Every Phidget has an API. You can view a device's API by selecting the device from the Device Tutorials page and then scrolling to the bottom of the page.
Remember...
When starting with a new Phidget, it's a good idea to review the API so you can familiarize yourself with all of the features that are available to you. The API you are exploring is the same API that any Phidget user sees (even professionals!), so there may be some items listed that require more advanced computer science knowledge.
Practice
- Use the HumiditySensor API to print the range of humidity values the Humidity Phidget can output.
- Use the TemperatureSensor API to print the range of values the Data interval can be set to.
- Use the TemperatureSensor API to write a program using Events that only prints the temperature change when the temperature has changed by more than 1 degree. Hint: You will only have to add one line of code to the code sample in the Smart Phidget Event Lesson.