![]() |
Re: Interrupt on driver station digital input
You can't interrupt on the digital inputs on the DS. If you're using a very coarse encoder (4-8 cycles per revolution) you might be able to manage it by simply sampling it every data packet from the DS... If it isn't turned too fast.
That said, if you're only interested in the angular position of the encoder is there any reason you can't use a plain old potentiometer to do this? There's stopless potentiometers if you need it to roll over, or multi-turn ones if you need a couple of turns. Expending all that effort to turn an encoder into just a potentiometer seems a little... excessive. |
Re: Interrupt on driver station digital input
Quote:
You would have to put a low pass filter on your PWM signal for the analog input to read it properly. If you post the specific frequency you will be duty cycle modulating, we can help you design the filter. It won't be much more than an RC network or two. There is a 5V power supply on the DS that you can use, it is set up just like the DSC. |
Re: Interrupt on driver station digital input
I'd transplant the encoder out of a USB joystick into the mechanical controls, while keeping the encoder attached electrically to the original processing hardware.
|
Re: Interrupt on driver station digital input
Has anyone cracked open the Attack 3's? We've drilled them to mount them, but we didn't break them open. Is the "thumb wheel" on the base an encoder, or a potentiometer?
|
Re: Interrupt on driver station digital input
You can also buy encoders with an analog interface, like the US Digital MA3. http://www.usdigital.com/products/en...ary/shaft/ma3/
|
Re: Interrupt on driver station digital input
Quote:
Quote:
|
Re: Interrupt on driver station digital input
Ah, my fear was right about the lack of interrupts. Thanks for the ideas, everyone. I didn't know about the 'portable computing devices' rule, and that definitely invalidates my workaround idea.
However, the stopless potentiometers and analog/absolute encoders look interesting. I've heard of stopless potentiometers before... do they come that way, or do they have to be modified to become limitless? |
Re: Interrupt on driver station digital input
Quote:
That said, I have never used the MA2 or MA3 on a Driver Station, but they should work just fine! |
Re: Interrupt on driver station digital input
Quote:
I imagine the code would be simple enough to just check the value each cycle and compare it to previous to get the "distance traveled". Big Caveat, It's been forever since I really sat down and programmed. |
| All times are GMT -5. The time now is 18:01. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi