Your assumption is you should get one motor state change per button push. One generally available debugging method is to add a print statement to verify. Add one to the turn motor on and turn motor off path. Then see what you get with the button push. Possible things you could see are not always getting a print, lots of prints, or it prints what you expect but the motor isn't doing what the prints say you commanded it to do. Each leads you down a next step. The multiple prints would question the assumption of one button press event per press. You can do a separate test of just the button press to verify its behavior. I have run into many occasions where the documentation is unclear or flat out wrong on how something operates.
I made a test program in LOGO: when button 0 is pressed, it prints "pressed" on the screen. Ran the program. Each button press results in exactly one printed statement. Holding the button down results in a continuous flow of statements. I'll try testing the real program another time. I considered the version Doug suggested but I'm not sure how to adjust its syntax for Lego LOGO. For now, Dan/Dean are helping me privately with the BASIC approach. I'll report back in a day or two... ________________________________ Evan Koblentz, director Vintage Computer Federation a 501(c)3 educational non-profit evan@vcfed.org (646) 546-9999 www.vcfed.org facebook.com/vcfederation twitter.com/vcfederation