PhidgetSpatial function not declared for Arduino

Comments & issues
Post Reply
ptalbot
Fresh meat
Posts: 2
Joined: Wed Jan 20, 2021 4:19 pm
Contact:

PhidgetSpatial function not declared for Arduino

Post by ptalbot »

I have a Teensy4.1 board, which is an Arduino. On windows, I use the tool Arduino 1.8.13 to compile the C code. I've loaded the library phidget21 and I have included the library.

The code is:

#include <phidget21.h>

void setup()
{
...
CPhidgetSpatialHandle spatial = 0;
CPhidgetSpatial_create(&spatial);
CPhidget_open((CPhidgetSpatialHandle)spatial, -1);
result = CPhidget_waitForAttachment((CPhidgetSpatialHandle)spatial, 10000);

When I compile, I get the error 'CPhidgetSpatial_create' was not declared in this scope.

Any idea why?
User avatar
mparadis
Site Admin
Posts: 660
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: PhidgetSpatial function not declared for Arduino

Post by mparadis »

Phidgets can only be used with computers that are running Windows, macOS, Linux, iOS or Android.

If you need something small, a Raspberry Pi zero is probably your best option.

The other option if space/portability is a concern would be to use a Wifi VINT Hub (HUB5000) and one of our VINT Spatials, and then use another computer on the same wifi network to access the spatial over the Network Server.
ptalbot
Fresh meat
Posts: 2
Joined: Wed Jan 20, 2021 4:19 pm
Contact:

Re: PhidgetSpatial function not declared for Arduino

Post by ptalbot »

Does the library can be compiled for the Arduino? Or do you have any plan to support the Arduino?

PhidgetSpatial would have been convenient to use since the Teensy 4.1 has a USB port.
User avatar
mparadis
Site Admin
Posts: 660
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: PhidgetSpatial function not declared for Arduino

Post by mparadis »

We don't have any plans to support USB-enabled Arduino boards.

If you're set on using the Teensy, there are plenty of arduino-compatible accelerometer/IMU breakout boards out there that communicate over I2C or serial.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests