Last change
on this file since 10 was
3,
checked in by wcaarls, 12 years ago
|
Published phidget_ik at revision 840
|
File size:
546 bytes
|
Rev | Line | |
---|
[3] | 1 | #include <stdio.h> |
---|
| 2 | #include <phidget_ik/phidget_ik.h> |
---|
| 3 | |
---|
| 4 | int main(void) |
---|
| 5 | { |
---|
| 6 | PhidgetIK phidget_ik; |
---|
| 7 | |
---|
| 8 | phidget_ik.init(-1); |
---|
| 9 | phidget_ik.waitForAttachment(1000); |
---|
| 10 | |
---|
| 11 | int inputs = phidget_ik.getInputCount(); |
---|
| 12 | if (phidget_ik.getLastError()) |
---|
| 13 | { |
---|
| 14 | std::cerr << "Error initializing PhidgetInterfaceKit: " << phidget_ik.getErrorDescription(phidget_ik.getLastError()) << std::endl; |
---|
| 15 | return 1; |
---|
| 16 | } |
---|
| 17 | |
---|
| 18 | for (int ii=0; ii != inputs; ii++) |
---|
| 19 | std::cout << "Input " << ii << " has state " << phidget_ik.getInputState(ii) << std::endl; |
---|
| 20 | |
---|
| 21 | return 0; |
---|
| 22 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.