View Single Post
  #1   Spotlight this post!  
Unread 03-12-2008, 02:04
Nameless Nameless is offline
Registered User
FRC #0074
 
Join Date: May 2008
Location: Holland, MI
Posts: 4
Nameless is an unknown quantity at this point
Interrupt on driver station digital input

Is it possible to attach an interrupt to a digital input on the driver station? I would like to use an encoder as an input device, and I don't believe there is any other way use them than with interrupts. I looked through the WPILib beta 5 code and didn't see anything about driver station interrupts in DriverStation.h/cpp and FRCComm.h.

If this isn't possible, I'm considering using a microprocessor to take in the encoder readings, keep track of the encoder offset, and output that as a PWM signal to the driver station analog input. For example, if the encoder is turned halfway around, the microprocessor would send a 50% PWM to the driver station. Would this work correctly? Also, does the driver station have a power source I could use? (As I understand it, external power is not allowed.)

For the visual people: