PhidgetSpatial function not declared for Arduino

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

PhidgetSpatial function not declared for Arduino

Postby ptalbot » Wed Jan 20, 2021 6:03 pm

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: 767
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: PhidgetSpatial function not declared for Arduino

Postby mparadis » Thu Jan 21, 2021 9:12 am

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

Postby ptalbot » Thu Jan 21, 2021 2:33 pm

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: 767
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: PhidgetSpatial function not declared for Arduino

Postby mparadis » Thu Jan 21, 2021 3:00 pm

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.


Return to “General”

Who is online

Users browsing this forum: No registered users and 2 guests