
Originally Posted by
jimp
I just can't seem to get my head wrapped around this logic stuff. I know you said you would draw something up and send it to me but I know you are very busy with the program code so I thought I would try to get a grasp on this on my own. I thought I would just try to start off simple and see what I could make work or not, so I started with a simple let me see if I can make the output turn on with a variable instead of just the button click. this was really pretty simple and I can make it come on with making a variable of 0 and having a button change the variable to 1 with logic saying that if the variable is equal to or greater than 1 then command output on. this turns on the output but of course clicking the button again doesn't shut it off, so I thought well I will just use the upclick vote on the button to trigger output hoping this is a state change and not just trigger on only. well that did nothing so I tried to use the upclick vote to change the variable to -1 but again this did nothing. the out put stays active until I close the program and then reopen it so it returns to its initial state of off.
At this point I figure I have to make this all work inside the logic, but I can't seem to figure out the logic it isn't logical to me, it seems to my feeble mind that some how I need to be able to put some kind of "else statement in there,(if variable = 1 then turn on output else if variable = 0 turn off output) but I don't see how thats done I can only have one output node and although I can make an if then statement I can't make an if else statement.
I guess I just don't understand what is going on under the hood so if there is any reading I could do that you know of to help me grasp this, or any links to or search terms I could use to find more info I'd appreciate it.
Thanks
Bookmarks