Phigets 1049 (Accelerometer) not working with sample code.

Supporting Visual Studio on Windows
tehrose
Phidgetsian
Posts: 7
Joined: Tue Aug 16, 2011 10:46 am
Contact:

Phigets 1049 (Accelerometer) not working with sample code.

Postby tehrose » Wed Aug 17, 2011 12:56 pm

I am using VS2010 so the solution file has to be updated before I can run the code, but it's unmodified. The code runs but the device will never attach. When I try to run the Accelerometer-graphical program, the form loads but just says "Attach a Phidget Accelerometer..."

I know the device is connected and working fine because the Phidgets Control Panel application sees the device and when I double click on it the Spatial - full program runs fine (and shows xyz data).

My OS is Windows 7 64-bit and I used the Phidget 21 Install file found on phidgets.com.

Thanks for any help!

AdamS

Re: Phigets 1049 (Accelerometer) not working with sample cod

Postby AdamS » Wed Aug 17, 2011 1:23 pm

Is the example you are using labelled Accelerometer or Spatial?

While the 1049 is technically an accelerometer, it is actually a Spatial 0/0/3 (0 gyro axes, 0 compass axes, 3 accelerometer axes). As such, you need to use the Spatial examples.

tehrose
Phidgetsian
Posts: 7
Joined: Tue Aug 16, 2011 10:46 am
Contact:

Re: Phigets 1049 (Accelerometer) not working with sample cod

Postby tehrose » Wed Aug 17, 2011 1:27 pm

Wow... AdamS, thank you!

I'll test it out when I get home.

paynterf
Phidgetsian
Posts: 6
Joined: Thu May 22, 2008 8:15 pm

Re: Phigets 1049 (Accelerometer) not working with sample cod

Postby paynterf » Sat Oct 08, 2011 5:56 pm

tehrose wrote:Wow... AdamS, thank you!

I'll test it out when I get home.


I had exactly the same problem and this solution worked great in VS2008 - simply changed the declaration from

Accelerometer accel = New Accelerometer()

to

Spatial accel = New Spatial()

and all was well - Thanks!!

Frank


Return to “C#.NET”

Who is online

Users browsing this forum: No registered users and 1 guest