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

43 lines
1.8 KiB
Markdown

---
layout: download
board_id: "m5stack_dial"
title: "Dial - Smart Rotary Knob with Touch Screen Download"
name: "Dial - Smart Rotary Knob with Touch Screen"
manufacturer: "M5Stack"
board_url:
- "https://docs.m5stack.com/en/core/M5Dial"
board_image: "m5stack_dial.jpg"
date_added: 2024-02-19
family: esp32s3
bootloader_id: m5stack_dial
downloads_display: true
features:
- Speaker
- Battery Charging
- Display
- Wi-Fi
- USB-C
- Bluetooth/BTLE
---
As a versatile embedded development board, **M5Dial** integrates the necessary features and sensors for various smart home control applications. It features a 1.28-inch round TFT touchscreen, a rotary encoder, an RFID detection module, an RTC circuit, a buzzer, and under-screen buttons, enabling users to easily implement a wide range of creative projects.
M5Dial provides versatile power supply options to cater to various needs. It accommodates a wide range of input voltages, accepting 6-36V DC input. Additionally, it features a battery port with a built-in charging circuit, enabling seamless connection to external Lithium batteries. This adaptability allows users to power M5Dial via USB-C, the DC interface, or an external battery for on-the-go convenience. M5Dial also reserves two PORTA and PORTB interfaces, supporting the expansion of I2C and GPIO devices. Users can connect various sensors, actuators, displays, and other peripherals through these interfaces, adding more functionality and possibilities.
### Features
- Circular TFT touch screen
- M5StampS3
- Encoder
- RFID
- 6-36V voltage input
- Battery charger
- Interface extension: reserved PORTA and PORTB interfaces
- Programmable button
## Documentation
* [M5Dial](https://docs.m5stack.com/en/core/M5Dial)
## Purchase
* [M5Stack](https://shop.m5stack.com/products/m5stack-dial-esp32-s3-smart-rotary-knob-w-1-28-round-touch-screen)