Creating a Channel

From Phidgets Support
Jump to: navigation, search
 Phidget Programming Basics: Creating a ChannelTOC Icon.png Table of Contents

Back Arrow.png WhiteTab1.png WhiteTab2.png WhiteTab3.png GreenTab4.png WhiteTab5.png WhiteTab6.png WhiteTab7.png WhiteTab8.png WhiteTab9.png WhiteTab10.png WhiteTab11.png WhiteTab12.png WhiteTab13.png WhiteTab14.png WhiteTab15.png WhiteTab16.png Next Arrow.png


4 . Creating a Channel

To control a Phidget channel, you must first create an instance of its channel class that will be used to keep track of the channel through your program.

For example:

 # Create a new Accelerometer channel
 accel = Accelerometer()
 # Create a new RFID channel
 rfid = RFID()

 // Create a new Accelerometer channel
 Accelerometer accel = new Accelerometer();
 // Create a new RFID channel
 RFID rfid = new RFID();

 // Create a new Accelerometer channel
 Accelerometer accel = new Accelerometer();
 // Create a new RFID channel
 RFID rfid = new RFID();

 // Create a new Accelerometer channel
 PhidgetAccelerometerHandle ch;
 PhidgetAccelerometer_create(&ch);
 // Create a new RFID channel
 PhidgetRFIDHandle ch;
 PhidgetRFID_create(&ch);