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
  • Robotics with the Board of Education Shield for Arduino

Robotics with the Board of Education Shield for Arduino

Chapter 2 Challenges

Questions

  1. How do you connect two leads together using a breadboard?
  2. What function sets a digital pin’s direction? 
  3. What function sets pin 13 to 5 V?  What function sets it to 0 V?
  4. How can a sketch control the duration of a 5 V signal?
  5. What are the pulse durations that tell a continuous rotation servo to turn
    1. full speed clockwise,
    2. full speed counterclockwise,
    3. stay still.
  6. Which call would make a servo turn faster?
    1. servoLeft.writeMicroseconds(1440) or
    2. servoLeft.writeMicroseconds(1420).  Why?
  7. How can a sketch control the duration of a certain servo signal?

Exercises

  1. Write a loop function that makes an LED blink 5 times per second, with an on time that’s 1/3rd of its off time. (Disconnect the servos for this exercise!)
  2. Write a setup function that makes the pin 13 servo turn full speed clockwise for 1.2 seconds, while the pin 12 servo stays still.  After that, set both servos to stop.
  3. Write a setup function that makes one servo turn the same direction for 3 seconds.  The other servo should turn the opposite direction for the first 1.5 seconds and the same direction for the second 1.5 seconds.  Then, make both servos stop.

Projects

  1. Look up the servo library’s detach function and use it in place of servoLeft and servoRight.writeMicroseconds(1500) to stop servos after they turn for 3 seconds.
  2. Write a program that makes the pin 13 servo turn counterclockwise while the pin 12 servo turns clockwise.  After 3 seconds, make both servos turn counterclockwise for 0.6 seconds.  Then, make both turn clockwise for 0.6 seconds.  Then, make the pin 13 servo turn clockwise and the pin 12 servo turn counterclockwise for 3 seconds.

Printer-friendly version
Chapter 2 Summary
Prev
Chapter 2 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