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 second pushbutton circuit.
    • Incorporated it into a light control project.
    • Changed the light control project’s features.
  • Does your second pushbutton operate correctly?
  • Were you able to create multiple pushbutton projects incorporating multiple LEDs?
  • Do you understand how various loop commands can be used to control the functioning of the pushbuttons and LEDs?

Questions

  1. What component(s) on your breadboard are used for input and can be used as control devices?
  2. What does it mean for an if statement to be nested?

Exercises

  1. In basic terms, what happens when statements inside while True and if statements aren’t indented properly?
  2. How are list and index used to move through items in a list?
  3. How are pushbuttons used to manipulate other components?
     

Projects

  1. Modify the Your Turn script so that there are no LEDs lit unless a button is being pressed.
  2. Modify the Your Turn script so that the lights stay on for increasingly longer (or shorter) lengths of time depending on which pushbutton is held down. Maintain the LED color change as it is.
  3. For this project combine what you know about the zip function (from the LED Lights tutorial), lists, and pushbuttons to create a script that cycles through each LED in increasingly longer time spans before cycling back through the color sequence each time the pushbutton at P9 is pressed (not held down).

 


Printer-friendly version
Two-button Control
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