|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
programming a motor to two buttons
hey im new to chief del phi as well as to programming. I have configured a program to run a motor on button six on the attack controller. however i dont know how program buttton seven to reverse the same motor. help please.....
![]() In my second while loop is where my window motor is i already have it programmed to button six but i want it to be programed to button six and reverse by button seven.... Last edited by solomason519 : 28-01-2009 at 11:35. Reason: i want to add an attachment |
|
#2
|
|||||
|
|||||
|
Re: programming a motor to two buttons
That's... an interesting way of turning a motor on and off with a button. A slightly cleaner and more expandable way is to use the Select function block (in the Programming>Comparison palette), or a set of Case Structures. The Select function block has one boolean input (green wire) and two other inputs that can be of many different types. It selects which of these two other inputs to pass to the output based on whether the boolean is true or false. I've put together the motor control you were looking for in the picture below using some select blocks. This particular wiring forces the forward button to override the reverse button. So if you have both buttons pressed, the motor will move forwards.
|
|
#3
|
|||
|
|||
|
Re: programming a motor to two buttons
Thanks you so much kevin. You have helped me get to where i needed to be.....
![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Programming Joystick Buttons to toggle a motor on and off | programmr | C/C++ | 6 | 25-01-2009 17:47 |
| Programming a single relay to two buttons in easyC Pro? | Gizmo2417 | Programming | 1 | 17-02-2008 17:10 |
| Help Programming Buttons | LordFrz | Programming | 3 | 14-02-2008 13:55 |
| Programming Extra Joystick Buttons | Inverted | Programming | 2 | 08-02-2007 11:45 |
| Is it okay to run one motor in a two motor transmission? | NoodleKnight | Technical Discussion | 27 | 16-12-2004 07:16 |