.. 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")
```
1.9 KiB
1.9 KiB
| layout | board_id | title | name | manufacturer | board_url | board_image | date_added | family | bootloader_id | features | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| download | seeeduino_xiao | Seeed Studio XIAO SAMD21 Download | Seeed Studio XIAO SAMD21 | Seeed Studio |
|
seeeduino_xiao.jpg | 2020-01-17 | atmel-samd | XIAO_m0 |
|
Seeed Studio XIAO SAMD21 is a minimal, low-cost board that uses the Atmel ATSAMD21G18, a powerful 32-bit ARM Cortex®-M0+ processor running at 48MHz with 256 KB Flash and 32 KB SRAM. The board is 20 mm x 17.5 mm in size which is perfect for wearable devices and small projects. It has multiple interfaces including DAC output, SWD Bonding pad interface, I2C, UART and SPI interfaces. It's compatible with both Arduino IDE and CircuitPython and uses a USB-C connector.
Technical details
- CPU: ARM Cortex-M0+ CPU (SAMD21G18) running at up to 48 MHz
- Flash Memory: 256 KB
- SRAM: 32 KB
- Digital I/O pins: 11
- Analog I/O pins: 11
- I2C interfaces: 1
- SPI interfaces: 1
- UART interfaces: 1
- USB-C connector for transferring code and power
- Power requirements: 3.3 V/5 V DC
- Dimensions: 20 mm x 17.5 mm x 3.5 mm
Note: This microcontroller runs at 3.3 V logic. Using a 5 V device may damage the chip or device.
For power supply pins: The built-in DC-DC converter circuit is able to change 5 V voltage into 3.3 V, which allows you to power the device with a 5 V supply via the VIN pin or 5V pin.