This is the basic mine program. The switch for the mine is a circular wire mounted on the outside of the JackBord. This wire represents one half of the switch the other half of the switch is the case of the JackBord itself. Thus to close the switch, or press the button, the wire comes into contact with the case of the JackBord this is what triggers the mine.
When triggered the mine program will display a message and it will also tell you the number of times that it has been triggered. Once triggered 10 or 11 times the program will exit.
Basic Mine Program
The switch for the mine is connected to the JackBords
port A pins 5 and ground.
When triggered the mine will tell you.
print "Mine Start"
-- Setup the trigger for pin A5
btp a5 d1 1|/boom 1|"BOOM!"
-- Turn D1 off
-- main program loop
-- Check if mine triggered.
any /boom = 1 ->
-- YES triggered
print "Count /count TRIG no /triggers BOOM /boom"
-- Exit after 10 triggers.
any /triggers > 10 -> exitprog
-- clear the buttons