{"id":13790076,"url":"https://github.com/simmsb/tyrfing","last_synced_at":"2025-04-14T02:03:51.482Z","repository":{"id":219719457,"uuid":"749505037","full_name":"simmsb/tyrfing","owner":"simmsb","description":"Firmware for flashlights using loneoceans attiny1616 drivers","archived":false,"fork":false,"pushed_at":"2024-11-16T09:30:09.000Z","size":3409,"stargazers_count":9,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-16T10:24:44.181Z","etag":null,"topics":["attiny1616","avr","embassy","embedded","flashlight","flashlight-firmware","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simmsb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-28T19:12:35.000Z","updated_at":"2024-11-16T09:30:16.000Z","dependencies_parsed_at":"2024-02-21T21:25:04.449Z","dependency_job_id":"9aae9226-9ec1-4efe-859f-d031a5eee5c2","html_url":"https://github.com/simmsb/tyrfing","commit_stats":null,"previous_names":["simmsb/embassy-avr-test"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simmsb%2Ftyrfing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simmsb%2Ftyrfing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simmsb%2Ftyrfing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simmsb%2Ftyrfing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simmsb","download_url":"https://codeload.github.com/simmsb/tyrfing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232844800,"owners_count":18585275,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["attiny1616","avr","embassy","embedded","flashlight","flashlight-firmware","rust"],"created_at":"2024-08-03T22:00:36.691Z","updated_at":"2025-01-07T08:18:24.350Z","avatar_url":"https://github.com/simmsb.png","language":"Rust","funding_links":[],"categories":["Gadgets"],"sub_categories":[],"readme":"# Flashlight firmware, written in rust\n\n\nhttps://github.com/simmsb/tyrfing/assets/5330444/455c9a46-7eb3-438b-a824-84d08574c565\n\n\nThis is flashlight firmware for the lume1-6af (attiny1616), written in Rust. \nIt supports thermal and voltage regulation that prevents LED and battery damage by reducing output as temperature increases, and prevents usage when the battery voltage is too low.\n\nThe UI is implemented using async rust, which makes adding new modes of operation fairly trivial.\n\nThe UI and features are inspired by the\n[Andúril](https://github.com/ToyKeeper/anduril) firmware\n\n## Current UI\n\nThis might be wrong, the [source code is here](./src/states.rs)\n\n```mermaid\nstateDiagram-v2\n    [*] --\u003e Locked\n\n    state Locked\n\n    Locked --\u003e Unlocked : 3c\n    Unlocked --\u003e Locked : 4c\n    Unlocked --\u003e Locked : Timeout\n\n\n    state Unlocked {\n        [*] --\u003e Ramping : 1c\n        [*] --\u003e Ramping : 1h (low start)\n        \n        state Ramping {\n            [*] --\u003e [*] : 1h (increase brightness)\n            [*] --\u003e [*] : 2h (decrease brightness)\n        }\n        \n        Ramping --\u003e [*] : 1c\n\n        [*] --\u003e Fading : 2h\n        \n        state Fading {\n            [*] --\u003e [*] : 1h (increase brightness)\n            [*] --\u003e [*] : 2h (decrease brightness)\n            [*] --\u003e [*] : 3h (increase timeout)\n        }\n        \n        Fading --\u003e [*] : 1c\n\n        [*] --\u003e Strobing : 3h\n        \n        state Strobing {\n            [*] --\u003e [*] : 1h (increase brightness)\n            [*] --\u003e [*] : 2h (decrease brightness)\n            [*] --\u003e [*] : 3h (decrease period)\n            [*] --\u003e [*] : 4h (increase period)\n        }\n        \n        Strobing --\u003e [*] : 1c\n\n    }\n```\n\n## Thanks\n\nThis project relies on and makes modifications to:\n\n- [Embassy](https://github.com/embassy-rs/embassy)\n- [atxtiny-hal](https://github.com/G33KatWork/atxtiny-hal)\n- [avr-device](https://github.com/Rahix/avr-device)\n- [Andúril](https://github.com/ToyKeeper/anduril): Used as a reference for AVR\n  and power related things.\n\n## EMBASSY on an attiny1616\n\nThis is some messing around with embassy on AVR (attiny1616)\n\nThe time driver ticks at 64hz and I've modified embassy to use a u32 tick\ncounter, which at 64hz won't overflow for just enough time for this to be useful\nto me\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimmsb%2Ftyrfing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimmsb%2Ftyrfing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimmsb%2Ftyrfing/lists"}