circuitpython-org/_board/waveshare_rp2040_lcd_1_28.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

1.8 KiB
Raw Permalink Blame History

layout board_id title name manufacturer board_url board_image date_added family features
download waveshare_rp2040_lcd_1_28 RP2040-LCD-1.28 Download RP2040-LCD-1.28 Waveshare
https://www.waveshare.com/rp2040-lcd-1.28.htm
waveshare_rp2040_lcd_1_28.jpg 2023-01-31 raspberrypi
USB-C
Battery Charging
Display

RP2040-LCD-1.28 is a low-cost, high-performance MCU board designed by Waveshare. Tiny size with onboard 1.28inch LCD round display, Li-ion battery recharge manager, 6-axis sensor (3-axis accelerometer and 3-axis gyroscope) and so on, adapting all GPIO and Debug pins, which makes it easy for you to develop and integrate it into products quickly.

Board specifications

  • RP2040 microcontroller chip designed by Raspberry Pi in the United Kingdom
  • Dual-core Arm Cortex M0+ processor, flexible clock running up to 133 MHz
  • 264KB of SRAM, and 2MB of on-board Flash memory
  • Type-C connector, keeps it up to date, easier to use
  • Onboard 1.28inch 240×240 pixels 65K colorful IPS LCD display for clear color pictures
  • Lithium battery recharge/discharge header, suitable for mobile devices
  • All GPIO pins are adapted through 1.27 pitch female headers (There are 30 pins in total, but some pins have been connected to the internal circuit, please refer to the wiki for details when multiplexing)
  • USB 1.1 with device and host support
  • Low-power sleep and dormant modes
  • Drag-and-drop programming using mass storage over USB
  • 2 × SPI, 2 × I2C, 2 × UART, 4 × 12-bit ADC, 16 × controllable PWM channels
  • Accurate clock and timer on-chip
  • Temperature sensor
  • Accelerated floating-point libraries on-chip
  • 8 × Programmable I/O (PIO) state machines for custom peripheral support

Purchase