CircuitPython Microcontroller Programming¶
We will be using a CircuitPython microcontroller to control physical hardware. The following examples introduce basic embedded programming techniques.
For more advanced examples on a greater diversity of hardware, please see the RCP CircuitPython guide.
General CircuitPython Guide¶
Raspberry Pi Pico¶
The Raspberry Pi Pico is a low-cost microcontroller board from the Raspberry Pi Foundation. It has a breadboard-friendly layout and many pins for input and output, but the only built-in I/O device is a single LED. It is our workhorse for building embedded devices and is Lab Part 1005.
- Raspberry Pi Pico
- Introductory Examples - Raspberry Pi Pico
- Hobby Servo Examples - Raspberry Pi Pico
- Digital Input/Output Examples - Raspberry Pi Pico
- DC Motor Examples - Raspberry Pi Pico
- Analog Input/Output Examples - Raspberry Pi Pico
- Stepper Motor Examples - Raspberry Pi Pico
- Ultrasonic Ranger Examples - Raspberry Pi Pico
- NeoPixel LED Examples - Raspberry Pi Pico
- I2C Examples - Raspberry Pi Pico
- CAP1188 Capacitive Touch Sensing - Raspberry Pi Pico
- Decision Tree Classifier - Raspberry Pi Pico
CircuitPython Universal Examples¶
The following samples are purely computational and should apply to any CircuitPython platform.
Exercises¶
The exercises are intended to be quick, simple introductions to technique. Part of the exercise is absorbing a set of technical terms; the meaning will become apparent in time through immersion in practice.
Servo Motion with the Pico. Introduction to hobby servos and programming practice in CircuitPython.
Digital I/O with the Pico. Introduction to digital input and output in CircuitPython.
Analog Sensing with the Pico. Introduction to analog-to-digital conversion in CircuitPython.