Script: continuity_tester.hex
This script will use the CYBERscope to probe the electrical connections when the button is pressed and not pressed.
- Right-click continuity_tester.hex (below), and choose Save Link As...to download.
- Click the micro:bit Python Editor's Open button, then select and open continuity_tester.hex.
- Click Send to micro:bit.
- Click the three vertical dots ⋮ by the Send to micro:bit button, and select Disconnect.
- Start the CYBERscope:
- In a different browser tab, go to cyberscope.parallax.com.
- Click the CYBERscope's Connect button.
- In the serial port dialog, select the port with mbed in its name, and then click Connect.
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)