Skip to content
Parallax Learn

Parallax Learn

  • Welcome
  • Tutorials
        • Tutorial Series head tag

          Tutorial Series
        • Tutorial Series

          The special, classroom-ready series pages are organized collections of tutorials for our most popular hardware and/or languages. The tutorials for each topic are conveniently accessible from a single page, shown in the order it is recommended that they be completed.
        • Robotics Series Head tag

          Robotics Series
        • Robotics Series

          • Artificial Intelligence
          • Cybersecurity: Radio Data tutorialCybersecurity
          • cyber:bot + Python
          • cyber:bot + MakeCode
          • Boe-Bot Tutorial SeriesBoe-Bot
          • Arduino Shield-Bot
          • ActivityBot with C TutorialsActivityBot + C
          • ActivityBot with BlocklyProp Tutorial SeriesActivityBot + BlocklyProp
          • Scribbler 3 Tutorial SeriesScribbler 3
        • Electronics & Programming Series Head tag

          Electronics & Programming Series
          • BS2 Board of Education Tutorial SeriesBS2 Board of Education
          • Propeller C-Language BasicsPropeller C Basics
          • FLiP Try-It Kit C Tutorial SeriesFLiP Try-It Kit + C
          • FLiP Try-It Kit BlocklyProp TutorialsFLiP Try-It Kit + BlocklyProp
          • Badge WX Tutorial SeriesBadge WX
          • Propeller BlocklyProp Basics and ProjectsPropeller BlocklyProp Basics
          • View All Tutorial Series »
        • Browse Tutorials
        • Browse Tutorials

          Individual tutorials sorted by robot or kit, and language.
        • By Robot or Kit
          • ActivityBot
          • SumoBot WX
          • Boe-Bot
          • Shield-Bot
          • cyber:bot
          • Badge WX
          • ELEV-8
          • ARLO
        • By Language
        • By Language

          • Propeller C
          • Arduino
          • BlocklyProp
          • PBASIC
          • Python
          • MakeCode
          • View All Tutorials »
  • Educators
  • Reference
  • Downloads
  • Home
  • All Courses
  • Sense Pushbutton Presses

Sense Pushbutton Presses

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.

  • Right-click continuity_tester.hex (below), and choose Save Link As…to download.

continuity_tester.hex

  • 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)

 


Printer-friendly version
Inside the Pushbutton
Prev
How it Works
Next

DISCUSSION FORUMS | PARALLAX INC. STORE

About | Terms of Use | Feedback: learn@parallax.com | Copyright©Parallax Inc. 2024

© 2025 Parallax Learn • Built with GeneratePress