![]() |
Easy C Relay Programming
for easy C,
i know you can set a relay to a button and have that relay in a set position when you hold the button, but can you, in easy c, have it so you click the button once and the relay stays on, and click it again to switch the relay reverse or off? i know the wording of this question is not too great, but if you can decipher it, an answer would be great! |
Re: Easy C Relay Programming
You want the relay to toggle. Its not too complicated to do.
This example will toggle a relay when the trigger is pulled on the first joystick. Code:
char relayPos = 0; //Holds the current position of the relay |
| All times are GMT -5. The time now is 13:14. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi