|
Switch Test program
The flowchart program is a very useful environment for the programming of the servo board because the Symbol table defines the various connections.
Then it is easy to refer to the components and know that the connections are handled in the correct manner in the program.
You will find it easier to use these higher level terms like SW1 rather than IF PIN3 = 1.
The flowchart program and the susequent export to the BASIC code is enhanced with the symbol definition.
The flowchart is simple with three IF comparison of the switch status.
If SW1 is pressed then the variable b0 is set to 1.
If SW2 is pressed then variable B0 is set to 2 and If SW3 is pressed the variable is set to 3.
The debug command will display the values as the program cycles through.
Note that the program must be downloaded to see this value.
.
|