Simple logic

by michael denton (Login mike1939)

Dear folks

Although I have reasonable experience I have been unable to solve this "simple" problem, must be my age?

I thought perhaps you would help me solving a "simple" logic problem in Basic.
It is.....

1. A switch is open
2. The switch closes
3. Log the event
4. Go back to start
5. Is the switch open?
6. If so watch it until it closes again
7. Log the event...etc etc

Problem I can't solve is to disregard switch closed after first time until it has opened and closed again.

I want to monitor the number of times the switch has closed, opened and closed again.

At the moment as I cycle round it logs the switch closure every time, even though it has only been closed once.

Hope you can help with a bit of code


Mike Denton

Posted on Aug 6, 2009, 1:51 AM

Respond to this message   

Goto Forum Home

Response TitleAuthor and Date
*I never got past line 4...Galleon on Aug 6
* You need FreeBasic for that.Pete on Aug 6
 * Wait, what?Anon on Aug 6
At which point is the Start located?Solitaire on Aug 6
Use a capacitor with a large bleeder resistorClippy on Aug 6

 Copyright © 1999-2018 Network54. All rights reserved.   Terms of Use   Privacy Statement