Go to Post This may not be Battlebots but it sure isn't Pretty Pretty Princess Bots. - Andrew Schreiber [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 30-01-2016, 14:40
zDrakon zDrakon is offline
Registered User
FRC #3501
 
Join Date: Feb 2015
Location: Sunnyvale
Posts: 10
zDrakon is an unknown quantity at this point
DigitalInput gyro class help

So I'm trying to create a DigitalInput gyro class, and have tried googling for any available open source libraries, seems not.

I believe I'm supposed to make my own Gyro class to extend the empty "Gyro" class. My team's gyro only uses digital input, so... how exactly could I start off using the DigitalInput class to get values from the gyro and basically do what AnalogGyro does (calibrate, getAngle, reset, free, etc.) since it comes with those empty methods.
  #2   Spotlight this post!  
Unread 30-01-2016, 15:01
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,544
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: DigitalInput gyro class help

What is the part number of the gyro you are trying to use?
  #3   Spotlight this post!  
Unread 30-01-2016, 15:37
zDrakon zDrakon is offline
Registered User
FRC #3501
 
Join Date: Feb 2015
Location: Sunnyvale
Posts: 10
zDrakon is an unknown quantity at this point
Re: DigitalInput gyro class help

I've been confused on this. Just talked to others and seems like we know what we're going to do now. The part was https://www.sparkfun.com/products/10121.

Anyways if I need more help I'll post again here.
  #4   Spotlight this post!  
Unread 31-01-2016, 10:22
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 325
fovea1959 will become famous soon enough
Re: DigitalInput gyro class help

how are you handling hooking the 3.3 device up t a 5V roboRIO I2C? Are you using level shifters, or is it just working?
  #5   Spotlight this post!  
Unread 31-01-2016, 10:39
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,511
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: DigitalInput gyro class help

Quote:
Originally Posted by fovea1959 View Post
how are you handling hooking the 3.3 device up t a 5V roboRIO I2C? Are you using level shifters, or is it just working?
From the RoboRIO RIO User's Manual, page 10, lower right cell of the table in the I2Csection:
Quote:
Originally Posted by NI
I2C lines with 3.3 V output, 3.3 V/5 V-compatible input. Refer to the I2C Lines section for more information.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
  #6   Spotlight this post!  
Unread 31-01-2016, 11:32
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 325
fovea1959 will become famous soon enough
Re: DigitalInput gyro class help

Quote:
Originally Posted by GeeTwo View Post
From the RoboRIO RIO User's Manual, page 10, lower right cell of the table in the I2Csection:
d'oh! thanks.
Closed Thread


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 18:52.

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