Script and Tests

Script: continuity_tester.hex

This script will use the CYBERscope to probe the electrical connections when the button is pressed and not pressed.

  • If  you don't already have it, right-click continuity_tester.hex and select Save link as... to download it.

continuity_tester.hex

  • Go to python.microbit.org/v/2.
  • Click Load/Save and then drag the file you just downloaded and drop it on the gray box in the Load section.  
  • Click the Flash button to load the script into the micro:bit.
  • Click Disconnect.

Tests

Here is the pushbutton’s theory of operation.  That’s the electronics-speak way of saying “how it works.”

  • Inside the pushbutton, pins 1 and 4 are always connected to each other.
  • Inside the pushutton, pins 2 and 3 are always connected to each other.
  • When the pushbutton is not pressed, the 1 and 4 pair of pins IS NOT connected to the 2 and 3 pair.
  • When the pushbutton is pressed and held down, the 1 and 4 pair of pins IS connected to the 2 and 3 pair.

Here are continuity tests you can perform to verify the pushbutton’s theory of operation.  First, verify that the 1,4 pair is not connected to the 2,3 pair unless the pushbutton is pressed (and held to get your measurement).

  • Start with the alligator clip probes connected as shown in the Circuit diagram:
  • Pushbutton pins 3 to 4: red probe to (j, 19) and the black probe to (j, 21)
  • Without pressing on the pushbutton, verify that the circuit is open (micro:bit LED displays a circle with a slash).
  • Press and hold the pushbutton down, and verify that the circuit is now shorted (micro:bit LED displays a checkmark).
  • Repeat the above tests with these continuity probe points:
    • Pushbutton pin 1 to 2: red probe to (a, 19) and the black probe to (a, 21)
    • Pushbutton pin 1 to 4: red probe to (a, 19) and the black probe to (j, 21)
    • Pushbutton pin 3 to 2: red probe to (j, 19) and the black probe to (a, 21)

Next, verify that the 1,4 and 2,3 pairs of pins are interconnected regardless of whether the pushbutton is pressed or not:

  • Repeat the continuity tests at these probe points, verifying that the continuity check mark always displays, regardless of whether or not the button is pressed.
    • Pushbutton pin 1 to 4: red probe to (a, 19) and the black probe to (j, 19)
    • Pushbutton pin 2 to 3: red probe to (a, 21) and the black probe to (j, 21)