View Single Post
  #10   Spotlight this post!  
Unread 27-07-2015, 13:24
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 802
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: Which sensors should be used throughout the robot?

Quote:
Originally Posted by Necroterra View Post
There is also an Interrupt system built into the processor, but I never used it. From what I understand, it's essentially an event handler which executes a function handler when a DigitalInput is fired.
Interrupts work, but have about a 100 uS delay between when the interrupt triggers and it gets captured. That is assuming that you are running the interrupt code in C++, have it in a thread, and have bumped the RT priority up of that thread so that it is very high priority. We have used them to capture the encoder count when we pass by a hall effect (or when we see an index pulse).

The FPGA image on the roboRIO supports DMA. That lets you save the state of all of the sensors, counters, and encoders to a buffer every time the event happens, and then go retrieve it when you have time. We patched WPILib last year to enable it, but the patches should be upstreamed this year. DMA is very handy and useful. This is how we calibrated 4 of the 5 encoders this year on our robot.