|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
How do I change the Gyro & Acc analog chanels?
In Kevins codes how do I do that?
tnx ahead. |
|
#2
|
||||
|
||||
|
Re: How do I change the Gyro & Acc analog chanels?
Look in gyro.h. There's an option to change the analog input that the gyro is connected to.
|
|
#3
|
|||
|
|||
|
Re: How do I change the Gyro & Acc analog chanels?
When I do that, I am not able to get any signal.
And what about the Accelerometer? |
|
#4
|
||||
|
||||
|
Re: How do I change the Gyro & Acc analog chanels?
Open up adc.h and define the number of channels you want the software to cycle through. The channels must be consecutive and always start at channel 1. Then you can assign the gyro to one of those enabled ADC channels.
-Kevin |
|
#5
|
|||
|
|||
|
Re: How do I change the Gyro & Acc analog chanels?
Did that (anabled another 2 analog chanenls) and consequently the Gyro won't give me any accurate values. I guess it's because of the change in the sample rates.
What else can I do ? Change some other definitions? |
|
#6
|
||||
|
||||
|
Re: How do I change the Gyro & Acc analog chanels?
Most likely, you'll need to double your sampling rate. Make sure your system can handle this higher interrupt rate before doing it, interrupt timing issues are very difficult to debug once they crop up.
-q |
|
#7
|
||||
|
||||
|
Re: How do I change the Gyro & Acc analog chanels?
Quote:
Update Rate = Sample Rate / (Samples Per Update * Number Of Channels) If you are sampling three ADC channels and left the other settings at the default, you're only getting ~17 updates per second, which is pretty low. You'll want to bump this up to somewhere in the 50-100 updates per second range by raising the sample rate and/or lowering the number of samples per update. For grins, try changing the sample rate to 1600Hz and change the samples per update to 8 and see if it's any better. -Kevin |
|
#8
|
|||
|
|||
|
yup works perfect.
A new question came up - if will increase the opened analog channels by another 2 (for example), I'll have to do this actions again? |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do i change the color of the scroll bar? | Compnerd | Website Design/Showcase | 6 | 06-03-2007 19:40 |
| Using gyro.c with other analog sensors no go | Astronouth7303 | Programming | 17 | 03-01-2006 21:04 |
| Need help with Gyro = Analog Devices ADXRS150EB | Jack Jones | Technical Discussion | 9 | 18-07-2005 07:00 |
| Using gyro with other analog sensors...again | demerski | Programming | 0 | 19-02-2005 08:23 |
| How do the Analog Inputs work? | JBotAlan | Electrical | 3 | 07-01-2005 00:11 |