Where do I put the jumper so that the program reads it as a variable being fulfilled? Also, how do I set the condition for a while loop to a timer? Any help is greatly appreciated. Thanks!
Can anyone help me out?
Stick the jumper into an IO port on the microcontroller (configure the micro controller for that slot to be a digitial input).
Use “GetDigitalInput” (or whatever the appropriate function is named) to see if that input port is shorted (by the jumper) or is an open circuit (no jumper inserted). Save, into a variable, the result of reading the input port (if you are using EasyC, it will be a 1 or a 0)
“IF” statements in the rest of the code can use the stored value in their expressions that get evaluted to control the flow of the program.
Inside the While loop, get the value of the timer (every time through the loop’s block of statement). In the expression part of the While statement, compare the timer value (or something computed from the timer value) to the threshold that is supposed to kick you out of the While loop.
Blake