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

Review and Practice

Self-check

  • In this activity, you:
    • Built and tested a pushbutton circuit.
    • Wrote scripts that monitored the pushbutton circuit through a micro:bit I/O pin.
    • Wrote scripts that performed different actions that depended on whether or not the pushbutton was pressed.
  • Did you successfully build the pushbutton circuit and understand the pushbutton pin map?
  • Do you understand how current flows through the pushbutton circuit?
  • Were you able to monitor the on/off states of the pushbutton circuit?
  • Were you able to manipulate the action of the LED given the state of the pushbutton?

Questions

  1. Where might you find pushbuttons?
  2. How are pin maps and schematics used?
  3. What is the allowable rotation for the pushbutton in relation to the pin map?
  4. What value represents the pushbutton when pressed?
  5. Name two circuit types that would be considered binary?
  6. What is the memory that stores the voltages measured by I/O pins called?
  7.  What do you call the memory element storing binary values that indicate whether or not voltage has been applied to a pin.
     

Exercises

  1. What call disables the micro:bit’s 5 x 5 LED display grid?
  2. What is the function of pin6.read_digital()?
  3. Which method is used to dictate the state of the LED?
  4. How does digital_read() impact the I/O pins?
  5. What is the threshold for determining that voltage has been applied to a pin?
     

Project

Write a script to make the light blink when the button is pressed but without using an if...statement.  Hint: the 1/0 value from the pushbutton state can be used to turn the light on or off, and then sleep.  After that, the script just needs to make sure it turns the light off and sleeps again before repeating the while True() loop.

 


Printer-friendly version
Input Register and Decisions
Prev
Solutions
Next

DISCUSSION FORUMS | PARALLAX INC. STORE

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

© 2025 Parallax Learn • Built with GeneratePress