Help DEBUGIN
I am not completely understanding the DEBUGIN command. I·referneced the book Whats a Microcontroller on page 122 and am not able to operate my Electronic speed controller. Attached is the code, can anyone give me insight please. This is to control a EDF F-35C jet using a joystick.
Comments
Unfortunately, you probably want the Stamp to continuously produce pulses at the same time it's waiting for you to enter a new pulse duration and Stamps can't do that. They're what are called single threaded processors. They do only one thing at a time and there's no overlap possible. What you could do is attach a pushbutton to the Stamp, ask for an initial duration, then start a loop where there's a PULSOUT, then a PAUSE. The DO statement can include a condition and this can check to make sure the pushbutton is not pushed. If it's not pushed, the loop continues. As soon as you push the pushbutton, the loop stops and the outer loop repeats where your program asks for a new duration. The pushbutton can be hooked up like others shown in "What's a Microcontroller?". Typically, there's a 10K or 100K resistor from an I/O pin to ground and the pushbutton is connected between the I/O pin and +5V. For safety, use another resistor (like 1K) between the pushbutton and the +5V. The I/O pin (INx where x is the pin #) will be non-zero when the pushbutton is pushed.
The pushbutton would be connected as I described to I/O pin 15.