All of the general discussion from the previous sections still apply. Here we simply provide CircuitPython versions of the Arduino examples.

For the basics on using servos with CircuitPython, checkout the information in the Essentials guide:


The example codes are based on the wiring shown below.

  • RED wire to USB
  • BLACK wire to GND
  • ORANGE signal wire to A1
  • WHITE feedback wire to A5

Reading the feedback

The basic mechanism is the same as before - simply connect the feedback to an analog input and read the value. To learn more about reading analog inputs, see the Essentials guide:

All that is needed is to setup an analog input and get its value.

feedback = AnalogIn(FEEDBACK_PIN)
position = feedback.value

The examples that follow will show this in more detail.

This guide was first published on Aug 24, 2013. It was last updated on Aug 24, 2013.

This page (Using With CircuitPython) was last updated on May 05, 2021.

Text editor powered by tinymce.