Go to Post One of the many things I love about CD is how knowledgeable and passionate everyone is. - CMBrandon [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 11-01-2016, 17:15
curtis0gj curtis0gj is offline
Registered User
FRC #5033 (Beavertronics)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Canada
Posts: 121
curtis0gj will become famous soon enough
Re: Gyroscope Programming

Quote:
Originally Posted by curtis0gj View Post
Howdy fellow robotic enthusiasts. I am in dire need of assistance programming our teams gyroscope. I am working with the iterative robot template and I am trying to instantiate my gyroscope. However, I always get the error, "Cannot instantiate the type Gyro." I have read that it has to do with instantiating interfaces. But I am bad at programming so I am unsure about this. Please help.

Here is a glimpse of what I am trying to accomplish.

Gyro gyro = new Gyro(1);

I think I have solved the error last year it was, Gyro gyro = new Gyro(1); to instantiate. This year it seems to be, AnalogGyro gyro = new AnalogGyro(1); If someone could confirm this that would be awesome.

Last edited by curtis0gj : 11-01-2016 at 17:19.
Reply With Quote
  #2   Spotlight this post!  
Unread 11-01-2016, 17:28
rzoeller rzoeller is offline
MN GOFIRST Recruitment Officer
AKA: Ryan Zoeller
FRC #2169 (RI3D 'Snow Problem; KING TeC)
Team Role: Alumni
 
Join Date: Nov 2009
Rookie Year: 2007
Location: Savage, MN
Posts: 111
rzoeller is a jewel in the roughrzoeller is a jewel in the roughrzoeller is a jewel in the rough
Re: Gyroscope Programming

Quote:
Originally Posted by curtis0gj View Post
I think I have solved the error last year it was, Gyro gyro = new Gyro(1); to instantiate. This year it seems to be, AnalogGyro gyro = new AnalogGyro(1); If someone could confirm this that would be awesome.
Probably better to do `Gyro gyro = new AnalogGyro(1);`. You'll want to read up on interfaces and abstract classes.
__________________
Ri3D - 'Snow Problem Programmer
MN GOFIRST Recruitment Officer
FRC 2169 Alumni
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:19.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi