Log in

View Full Version : DigitalInput gyro class help


zDrakon
30-01-2016, 14:40
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.

Joe Ross
30-01-2016, 15:01
What is the part number of the gyro you are trying to use?

zDrakon
30-01-2016, 15:37
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.

fovea1959
31-01-2016, 10:22
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?

GeeTwo
31-01-2016, 10:39
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 (http://www.ni.com/pdf/manuals/374474a.pdf), page 10, lower right cell of the table in the I2Csection:
I2C lines with 3.3 V output, 3.3 V/5 V-compatible input. Refer to the I2C Lines section for more information.

fovea1959
31-01-2016, 11:32
From the RoboRIO RIO User's Manual (http://www.ni.com/pdf/manuals/374474a.pdf), page 10, lower right cell of the table in the I2Csection:

d'oh! thanks.