yes, switch noise is always a problem but you have to balance the solution with the problem While the switch noise can be relatively long, The processing time for the Basic interpreter on a vintage computer is also very slow So there 2 kinds of switch debounce methods, hardware or software But the hardware method can involve several degrees of effectiveness depending on the size of modifications you want to add to the circuit
From a simple RC network on the switch input port, to a combo RC & Schmitt Trigger buffer, to a RS Flip-Flop or even a 74LS76 JK Flip-Flop Adding any of these options is very possible. But then again the Basic interpreter is very slow
The alternative with the software method involves adding a delay or timer loop in the switch scanning code. But this only adds more latency in the Basic code,which is already slow, this technique is mostly relegated to Machine code or compiled code where it runs faster than Basic code. For the time being, Evan has stated he will confine the programming to Basic code for now. Also now that he has direct control now over the interfaces by using Basic [or machine code], essentially having 'bare metal' programming at his fingertips when using that Lego 9750 box When I worked with Evan last summer on this project, I noticed severe limitations with Logo. I haven't spent enough time debugging the problems in Logo, nor do I really want to, But I think some of these switch problems present a race condition inherent within the Logo language. The Logo platform runs constantly in the background, and his Logo code is running in a Loop, so that same port is accessed by 2 different sources. Logo is really only meant for the simple projects The ports are only checked once by Basic code at a specific point within the Loop. And the loop in the Basic is nothing more complicated than 1. Init Hardware, Motors Off, Lamps Off 2. Read Input = Joystick Control switche 3. Read Input = Limit switche 4 Update State of Motors --> based on inputs 5. goto #2 BTW, Evan you only have 2 sensor input ports on that Lego 9750 box I lost track what you have connected, you should make a diagram to further your documentation I remember one button is connected for the Drive Motor So the other button is connected for the Steering Motor ? Because then you don't have any Sensor Input ports left over, in order to connect a Limit switch on the Steering Motor to prevent damage So I wondered what you had in mind, Dan