Go to Post Our job as mentors isn't to teach them how to make a robot...It's to teach them that there is value in technology and being among the people who create it. - Andy A. [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #9   Spotlight this post!  
Unread 26-07-2015, 20:00
Necroterra's Avatar
Necroterra Necroterra is offline
Registered User
FRC #4183 (Bit Buckets)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Tucson
Posts: 26
Necroterra will become famous soon enough
Re: Which sensors should be used throughout the robot?

Quote:
Originally Posted by thatprogrammer View Post
How exactly are the reed switches programmed? Same as limit switches?
I see people already let you know that you can use these magnetic reed switches as a standard DigitalInput, or set it up as the Limit Switch on a TalonSRX, but there's a few others. The class Counter can be used as such:

Code:
Counter reedSwitchWatcher = new Counter(channel)
or
Code:
Counter reedSwitchWatcher = new Counter(digitalInput)
As well as a few others. This tells the FGPA to directly watch the digitalInput and count when it is active / rising edges / falling edges / whatever you set it to. This means you don't have to check the switch as often as you would if you were accessing it directly, and you can use it to act on a switch's activation much more precisely.

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.
__________________

2015 Arizona East - Regional Winners, Creativity Award
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 05:58.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi