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

44 lines
2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
layout: download
board_id: "m5stack_cardputer"
title: "M5Stack CardPuter - M5StampS3 powered mini computer Download"
name: "M5Stack CardPuter - M5StampS3 powered mini computer"
manufacturer: "M5Stack"
board_url:
- "https://docs.m5stack.com/en/core/Cardputer"
board_image: "m5stack_cardputer.jpg"
date_added: 2024-03-10
family: esp32s3
bootloader_id: adafruit_feather_esp32s3_nopsram
downloads_display: true
features:
- Speaker
- Battery Charging
- Display
- Wi-Fi
- USB-C
- Bluetooth/BTLE
---
Cardputer is a card-sized portable computer that is perfect for engineers. At the heart of Cardputer is the M5StampS3, a mini development board based on the ESP32-S3 chip. Cardputer features a powerful dual-core processor, supports Wi-Fi functionality and integrates various peripherals and sensors, making it ideal for rapid functional verification, industrial control and home automation systems.
The device is powered by an internal 120mAh+1400mAh (in the base) lithium battery solution, eliminating concerns about battery life. In addition, Cardputer has built-in battery charging and voltage regulation circuits that automatically adjust voltage and current to protect the battery and the device. The base of the Cardputer incorporates a magnet, allowing it to be attached to metal surfaces such as fridges or whiteboards. Whats more, Cardputer's structure is compatible with Lego hole extensions, allowing users to create even more interesting designs using Lego bricks.
### Features
- Display: IPS LCD, 1,14", 240x135px
- Battery: internal 120mAh + 1400mAh (in the base) lithium battery
- TF-Card (MicroSD) slot
- 1 USB-C OTG in/out
- Keyboard: 56 keys, QWERTY type, ortholinear with tactile click switches
- Infrared ∠0° : 410cm, < 90° : 66cm, < 45° : 170cm
- Digital MEMS Microphone
- Sound: I2S-Speaker, @1W
- HY2.0-4P interface for expanding I2C sensors
## Documentation
* [Cardputer](https://docs.m5stack.com/en/core/Cardputer)
## Purchase
* [M5Stack](https://shop.m5stack.com/products/m5stack-cardputer-kit-w-m5stamps3)