|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Microswitch problem
Printf. And there are 3 plugins in the microswitch right? We connected the yellow one to the upper one, nothing to the middle one, and the red one to the lowest one
|
|
#2
|
|||||
|
|||||
|
Re: Microswitch problem
Quote:
Use only the outer wires at the RC digital input side. The red is power and used only by devices that need power to work. A switch doesn't need power. It simply connects the signal wire (yellow) to the ground (black) or not to close or open the circuit. If you have a multimeter you can use it to test that the switch is wired correctly. Last edited by Mark McLeod : 01-02-2007 at 10:50. |
|
#3
|
|||||
|
|||||
|
Re: Microswitch problem
Thanks! We've got it working!
![]() |
|
#4
|
|||
|
|||
|
Re: Microswitch problem
Darn we now have a new problem
![]() if (rc_dig_in01 == 0) { relay1_fwd = 0; relay1_rev = 0; } else { relay1_fwd = 1; relay1_rev = 1 ; } This is the code we are trying to use atm, but we have a problem. When the motor works foward, and i press the microswitch, it changes from 1 to 0 and the motor stops working. But when the motor is working backwards, and I press the microswitch, the microswitch turns to 0 but the relay1_rev remains 1 ;s Whats wrong? |
|
#5
|
||||
|
||||
|
Re: Microswitch problem
What motor? You haven't mentioned a motor before.
Andrew |
|
#6
|
|||||
|
|||||
|
Re: Microswitch problem
Here is a table of how to set the relay values to get the different results possible. It's from the IFI Spike document: http://www.ifirobotics.com/docs/spik...uide-sep05.pdf
We don't usually set both "rev" and "fwd" to 1 at the same time. Both fwd=0;rev=0; as well as fwd=1;rev=1; should mean the motor is off. This code will execute one section only as long as the switch is depressed and the other whenever the switch is not pressed. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| G.T.S ..... (problem) | Ami Schwartz | Programming | 3 | 28-01-2006 17:01 |
| A linking problem | T Shap | Programming | 6 | 15-01-2006 00:23 |
| Problem | Hailfire | CD Forum Support | 7 | 06-10-2002 15:02 |
| PROBLEM!!!!!!?????? | Clark Gilbert | CD Forum Support | 9 | 02-12-2001 12:43 |