![]() |
Problems programming a switch
I am trying to make our arm work on a switch(one position is up one for down and one for neutral) so far i have not successfully been able to get the switch to work the arm. At first i thought the code might be similar to the 1 joystick code but its not. We are using a motor like the one that is on the drivetrain to power it. Does anyone know how i could do this.
Thanks! |
Re: Problems programming a switch
I am trying to get this switch when flipped up to run a pwm at full speed (255?) when flipped to the middle to run it at neutral(127) and when flipped all the way down to run it in full reverse(0) does anyone have idea how i could code this.
Thanks again Cade |
Re: Problems programming a switch
Connect the common of the switch to ground on the OI, the "up" contact to p4_sw_aux1, and the "down" contact to p4_sw_aux2. Assuming the arm motor is on pwm3, your code would look like this:
Code:
if (p4_sw_aux1 == 1) |
| All times are GMT -5. The time now is 04:42. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi