View Single Post
  #1   Spotlight this post!  
Unread 24-01-2014, 21:06
LFRobotics's Avatar
LFRobotics LFRobotics is offline
Registered User
FRC #4623
 
Join Date: Jan 2014
Location: Little Falls, MN
Posts: 95
LFRobotics is on a distinguished road
How to Program Limit Switches

Hello - Im the head programmer/electronics guy at LF Robotics. I am the only one of my kind on the team and this is my first year so I have absolutely NO experience so PLEASE bear with me.

I have two limit switches part number V7-2B17D8-048 - Here is a picture:



I have a window motor - I want the window motor to pull a cord connected to a wheel - when the window motor reaches the end of its turn It will hit a limit switch - when it hits this limit switch I want it to reverse its direction and stop at its original location when it hits a second limit switch - it will be triggered again by a push of an assigned button on the joystick.

How would I program this - I have thought it over and researched it and am still royally confused on what to write code-wise to preform this task and how to wire the switches. I am using Command Based Java in Netbeans.

I asked the question about wiring it in the electronics section as well.

ANY help will be GREATLY appreciated - THANKS!

Last edited by LFRobotics : 24-01-2014 at 21:11.