|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Using one gyro sensor as two viritual gyros in code
Quote:
|
|
#2
|
|||
|
|||
|
Re: Using one gyro sensor as two viritual gyros in code
Quote:
Quote:
Gyro gyro(1); RelativeGyro relativegyro(&gyro); Then use Reset and GetAngle as you would with any gyro. |
|
#3
|
|||
|
|||
|
Re: Using one gyro sensor as two viritual gyros in code
Thanks for all the help! I think I'll probably go with the hardware approach and try to make a PWM splitter before our first match tomorrow. If it doesn't work for some reason, that code doesn't look too bad. I must agree with DavidGitz though, time for debugging is something we do not have, and at the moment, this just seems easier.
|
|
#4
|
||||
|
||||
|
Re: Using one gyro sensor as two viritual gyros in code
Quote:
The software is trivial, do it that way. The code by Bongle looks like it should work as is without any debugging. |
|
#5
|
|||
|
|||
|
Re: Using one gyro sensor as two viritual gyros in code
I wish to join the dead horse beaters in this thread. The Y-cable is the cheap fix that will almost definitely bite you later. Spend the extra 10 minutes and do it right.
|
|
#6
|
||||
|
||||
|
Re: Using one gyro sensor as two viritual gyros in code
That horse never listened to me, so I'll join the club. This code is so simple that it shouldn't require any testing to get right. The people who made the gyro weren't expecting the analog module to draw twice as much current as necessary from the gyro, so if you use the Y-cable approach, you'd be going against what the engineers designed the gyro for. Not a good idea!
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CODE: Using the gyro in autonomous | Kingofl337 | Programming | 1 | 20-01-2008 19:11 |
| two gyros? | gmiller_1249 | Programming | 7 | 24-05-2007 03:23 |
| problems using gyro/adc code with camera default code | tanstaafl | Programming | 7 | 22-01-2006 23:09 |
| Code violation using Hall effect sensor | pickle | Programming | 9 | 19-01-2005 00:10 |
| Using two spikes for one motor | supergrover | Control System | 6 | 24-02-2004 15:36 |