circuitpython-org/_board/pimoroni_servo2040.md
Jeff Epler 4715875cc4 Fix board dates to always be of the form YYYY-MM-DD
.. leading zeros are required for `frontmatter` to treat them as dates
rather than strings, apparently per the YAML specification.

This was done by script:
```py
import re
import datetime
import pathlib
import sys

import frontmatter

rx = re.compile(r'^(\s*)date_added:.*$', re.M)

for path_str in sys.argv[1:]:
    print(path_str)
    path = pathlib.Path(path_str)

    post = frontmatter.load(path)
    date_added = post.get("date_added", "")

    if isinstance(date_added, datetime.date):
        continue

    if isinstance(date_added, str):
        try:
            date_added = datetime.datetime.strptime(date_added, "%Y-%m-%d")
        except ValueError as exc:
            print(f"Failed to parse date {date_added} in {path_str}: {exc}")
            continue

    date_added = date_added.date()
    content = path.read_text("utf-8")
    new_content = rx.sub(lambda m: f"{m.group(1)}date_added: {date_added}", content)
    assert content != new_content

    path.write_text(new_content, "utf-8")
```
2024-03-22 11:31:45 -05:00

2 KiB

layout board_id title name manufacturer board_url board_image date_added family features
download pimoroni_servo2040 Servo 2040 Download Servo 2040 Pimoroni
https://shop.pimoroni.com/products/servo-2040
https://www.adafruit.com/product/5437
pimoroni_servo2040.jpg 2022-04-01 raspberrypi
Robotics
STEMMA QT/QWIIC
USB-C
Breadboard-Friendly

A standalone, RP2040 powered servo controller - great for building hexapods, robot arms or other things with lots of moving parts. It has RGB LEDs/Neopixels for status updates, built in current monitoring and headers to add up to 6 analog sensors. There's also a Qwiic/STEMMA QT connector for adding breakouts!

Features

  • Powered by RP2040 (Dual Arm Cortex M0+ running at up to 133Mhz with 264kB of SRAM)
  • 2MB of QSPI flash supporting XiP
  • 18 sets of header pins for connecting 3 pin hobby servos
  • 6 addressable RGB LEDs/Neopixels
  • 6 sets of header pins for connecting analog sensors
  • Onboard voltage and current sensing
  • Reset and BOOT button (the BOOT button can also be used as a user button)
  • USB-C connector for programming and power (3A max)
  • Screw terminals for supplying additional power (with reverse polarity protection) (10A max continuous current)
  • Qw/ST (Qwiic/STEMMA QT) connector

About RP2040

Raspberry Pi's RP2040 microcontroller is a dual core ARM Cortex M0+ running at up to 133Mhz. It bundles in 264kB of SRAM, 30 multifunction GPIO pins (including a four channel 12-bit ADC), a heap of standard peripherals (I2C, SPI, UART, PWM, clocks, etc), and USB support.

One very exciting feature of RP2040 is the programmable IOs which allow you to execute custom programs that can manipulate GPIO pins and transfer data between peripherals - they can offload tasks that require high data transfer rates or precise timing that traditionally would have required a lot of heavy lifting from the CPU.

Purchase