help with code
agfa
Posts: 295
could someone take a look at the code i have attached, and let me know whats wrong.· i'm sure it's something simple but i've been fighting it for two days now and i can't seem to see the problem.
its supposed to detect a zero to one transition on pin 6.
it appears to me that the statements after the if condition are met, only occurr once.
its supposed to detect a zero to one transition on pin 6.
it appears to me that the statements after the if condition are met, only occurr once.
Comments
Change your if statement to this and it should work....
compares if pevl is 0 and newl is 1
Regards,
Coley
EDIT:
I forgot to add, that you also need to make
part of the main repeat loop, presently it is only executed as part of the IF statement
therefore the code would only work once.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PropGFX Forums - The home of the Hybrid Development System and PropGFX Lite
Post Edited (Coley) : 7/30/2008 7:51:24 AM GMT
changing the location of the "prev1 := newl" got it working. i never would have thought of the if statement you suggested. nice. if anyone needs the most complicated way to do a simple task, just ask me.