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
  • Servo Position Control with Python and micro:bit

Servo Position Control with Python and micro:bit

Setup from Previous Tutorials

In these activities, you will write scripts to control the servo motor directly. In addition, you will also incorporate the pushbutton circuits from earlier activities for servo control and the LED circuits as indicators.

  • If you already have the setup from Measure Pushbutton LED Control with an Oscilloscope (repeated below), then skip to the next section: Battery Pack: Load, Connect, Test.
  • If you do not already have it built up:
    • Use the schematic, wiring diagram, and Parts List from Earlier Activities below to get your setup to the starting point for this tutorial. Then use the following two tests to check your setup.
    • Follow the instructions in Script and Tests from the Blink Sequencing activity in LED Lights.
    • Follow the instructions in Script and Tests from the Second Pushbutton activity in Sense Pushbutton Presses.

Parts Lists from Earlier Activities

Green, yellow and red LED circuits connected to P13, P14, and P15 from Blink Sequencing:

  • (1) LED – Red
  • (1) LED – Yellow
  • (1) LED – Green
  • (3) Resistors – 220 Ω  (red-red-brown-gold)
  • (3) Jumper wires – black

Pushbutton circuit connected to P6 from Build & Test a Pushbutton and pushbutton circuit connected to P9 with parts from Inside the Pushbutton plus parts and circuit from Second Pushbutton.

  • (2) Resistors – 220 Ω  (red-red-brown-gold)
  • (2) Resistors – 10 kΩ  (brown-black-orange-gold)
  • (2) Jumper wires – red
  • (2) Pushbuttons

Alligator clip probes from First Electrical Connections with a Breadboard and recently used in Measure Pushbutton LED Control with an Oscilloscope:

  • (1) Alligator clip probe – red
  • (1) Jumper wire – red
  • (1) Alligator clip probe – red
  • (1) Jumper wire – red

Always Leave on Your Board:

Jumper wires that connect the 3V to the (+) bus strips and GND to the (-) bus strips from Set Power for Circuits:

  • (2) Jumper wires – red
  • (2) Jumper wires – black

3-pin headers from First Electrical Connections with a Breadboard that connect the alligator clip probes to P2 and P0:

  • (2) 3-pin headers

If you completed Measure Resistance, leave these Ohmmeter Circuit parts connected to your board too:

  • (2) 3-pin headers
  • (1) Resistor – 2 kΩ  (red-black-red-gold)
  • (1) Jumper wire – yellow

 


Printer-friendly version
Battery Pack: Load, Connect, Test
Next

DISCUSSION FORUMS | PARALLAX INC. STORE

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

© 2025 Parallax Learn • Built with GeneratePress