ATtiny1616 firmware. Reads a TLE5012B magnetic angle sensor over SSC and streams it over RS485 (chainable, multi-device).
- MCU: ATtiny1616 (20MHz, 2KB RAM / 16KB Flash)
- Sensor: TLE5012B (15-bit angle, SSC)
- Bus: RS485 @ 2Mbps, 4-byte packets, up to 21-bit angle output
- Device ID: 0–31 (set at build time via
DEVICE_ID)
A USB-serial UPDI programmer (Adafruit UPDI Friend, serialUPDI). It appears as e.g. /dev/ttyUSB0 (CH340E).
- Standard — Switch Science #9535 / Adafruit 5879
- High-Voltage — DigiKey 5893 / Adafruit 5893. Adds a 12V pulse for chips whose UPDI pin is fused as reset/GPIO, and for unbricking.
The standard version is enough for normal use; the HV version is handy if you ever need to recover a bricked chip.
Set up PlatformIO in a uv venv (first time only):
uv venv
source .venv/bin/activate
uv pip install platformioBuild and upload. The Device ID is set with the build flag — just change the number:
PLATFORMIO_BUILD_FLAGS="-DDEVICE_ID=3" platformio run -t upload --upload-port /dev/ttyUSB0The example above flashes ID=3. Change DEVICE_ID to flash a different ID
They are distributed from enactic/openarm_hardware.