Advanced Lesson

Using the Phidget API

Every Phidget has a Phidget API – these are methods and events available to all Phidgets.

Phidget API

Select the Phidget API in the Humidity Phidget API dropdown.

Note, there are two Phidget APIs listed – these are both the same. All Phidgets share the same Phidget API.

API

Explore the API

The Phidget API lists all of the methods and events available to every Phidget. In the Phidget API, you will find familiar methods like Open, Close, set HubPort and set IsHubPortDevice, and Attach or Detach events!

Remember that the API you are exploring is the same API any Phidget user sees. There may be some items listed that require more advanced computer science knowledge!

Practice

  1. Use the Phidget API to print the attachment status of the Phidget.
  2. Use the Phidget API to set and print the Phidgets Library version.
Solutions available for educators. Email us for access.

What are Phidgets?

Phidgets are programmable USB sensors. Simply plug in your sensor, write code in your favorite language and go!

Phidgets have been used by STEM professionals for over 20 years and are now available to students.

Learn more

Set your preferences

Windows

Mac OS

Raspberry Pi

Java

Python

C#

Swift

NetBeans

Processing

Eclipse

Thonny

PyCharm

PyScripter

Visual Studio

Xcode

Setting your preferred operating system, programming language and environment lets us display relevant code samples for the Getting Started Tutorial, Device Tutorials and Projects

Done