beautypg.com

Elenco Snap Circuits SnapMicro I Deluxe ® User Manual

Page 42

background image

41

When you download the program the DEBUG

window shown here should appear on your computer

screen.

The debug window opens automatically after

a run, but can also be opened manually at any time

using the PICAXE

®

>Debug drop down menu.

After

releasing the push button the red LED will come on

while this window is being upgraded. The variable b1

is increased each time the switch is pressed and the

red LED is off.

Switch pressed 13 times

If the switch is pressed and released quickly while

the red LED is still on, the event will be missed. If it

is only pressed and not released, then the event will

be captured.

Notice that the b1 variable value is shown in decimal

(13), hexadecimal ($0D), and binary (%00001101).

For now the decimal output will be all we need.

Since the green LED is only ON during odd values of

b1, the light should have been lit during values

1,3,5,7,9,11, and 13. The light has been turned on 7

times, off 6 times, and is presently on. Although we

are using a light, the event could have been a switch

to open a door, turn on a motor, start an oven, or any

other event that would need monitoring. The Debug

window is not very user friendly but there is another

command ‘sertxd’ that can improve monitoring.

The same circuit will be used in the next project.

This manual is related to the following products: