{"id":13456818,"url":"https://github.com/ToyKeeper/anduril","last_synced_at":"2025-03-24T11:31:27.035Z","repository":{"id":205491971,"uuid":"714095516","full_name":"ToyKeeper/anduril","owner":"ToyKeeper","description":"Anduril 2 Flashlight Firmware and FSM UI Toolkit","archived":false,"fork":false,"pushed_at":"2024-05-13T09:54:22.000Z","size":7965,"stargazers_count":174,"open_issues_count":43,"forks_count":46,"subscribers_count":23,"default_branch":"trunk","last_synced_at":"2024-05-19T00:43:36.703Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ToyKeeper.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":"LICENSE","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":"2023-11-03T22:54:45.000Z","updated_at":"2024-05-31T09:06:59.370Z","dependencies_parsed_at":null,"dependency_job_id":"55a2d791-be06-41e8-ad79-1bde3f49e29e","html_url":"https://github.com/ToyKeeper/anduril","commit_stats":null,"previous_names":["toykeeper/anduril"],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ToyKeeper%2Fanduril","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ToyKeeper%2Fanduril/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ToyKeeper%2Fanduril/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ToyKeeper%2Fanduril/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ToyKeeper","download_url":"https://codeload.github.com/ToyKeeper/anduril/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245260874,"owners_count":20586490,"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":[],"created_at":"2024-07-31T08:01:28.309Z","updated_at":"2025-03-24T11:31:26.359Z","avatar_url":"https://github.com/ToyKeeper.png","language":"C","funding_links":["https://patreon.com/ToyKeeper"],"categories":["C"],"sub_categories":[],"readme":"# Anduril Flashlight Firmware + FSM Flashlight UI Toolkit\n\nAnduril is a user interface for flashlights.  It is written with FSM, a UI\ntoolkit for flashlights.\n\nWhat is FSM?  The \"SM\" means \"Spaghetti Monster\", and the \"F\" can be any F word\nyou like, such as \"Flashlight\" or whatever suits your mood.  FSM also means\n\"Finite State Machine\", which is the type of abstraction used for defining user\ninterfaces.  It is like a flowchart turned into executable code.\n\n\n## Using Anduril\n\nAnduril has many features, but the only things a person *really* needs to know\nto use it are:\n\n  - Click for on/off\n  - Hold to change brightness\n\nFor more in-depth use, read its [user manual](docs/anduril-manual.md)\nfor full details.\n\nIf you want to know what changed recently, check the [ChangeLog](ChangeLog.md).\n\nFor info about hardware-specific features, like what the channel modes are on\nmulti-channel lights, browse into the [hw/](hw/) directories to find the\nhardware model and any hardware-specific documentation.\n\n\n## Flashing Firmware\n\nGet the latest updates by flashing new firmware!\n\nA few things are needed to flash firmware:\n\n  - A firmware \".hex\" file.  Here's\n    [how to find the right .hex file](docs/which-hex-file.md).\n\n  - A flashing adapter.  The type of adapter depends on which MCU chip your\n    light uses.  It may be an UPDI 3-pin adapter (attiny1616 and newer) or an\n    AVR ISP 6-pin adapter (attiny85, attiny1634).\n\n    **UPDI** typically uses a \"pogo pin\" adapter, with spring-loaded pins to\n    hold against copper pads on the driver circuit.\n\n    **AVR ISP** typically has two parts -- a USB device (like a USBASP), and a\n    physical adapter (like a pogo pin adapter or SOIC8 clip).  SOIC8 is the\n    least convenient, and is mostly only used on old models with attiny85\n    chips.\n\n  - A firmware flashing program.  A few compatible programs include\n    `avrdude`, `pymcuprog`, and `ZFlasher`.\n\n  - A computer or phone.  Almost any modern computer or phone should be able to\n    do it, as long as you can plug the adapter in and run a flashing program.\n\nOne particularly useful guide is at https://anduril.click/ .\n\nMore info about installing flashing programs is below, in\n[Flashing Programs](#flashing-programs).\n\n\n## Compiling\n\nThe firmware can be deeply customized by modifying it and compiling your own\nversions, and this is encouraged.\n\nTo compile the firmware, it is strongly recommended that you use a Linux\ncomputer, ideally running Debian or Ubuntu (but almost any distro should work).\nVirtual machines work well, such as running WSL inside Windows.  There is also\na Docker container available (TODO: add link(s) here), if that is more\nconvenient.\n\n### Prerequisites:\n\n- AVR toolchain packages:  \n  `sudo apt install gcc-avr avr-libc binutils-avr`\n\n- Other misc packages:  \n  `sudo apt install git wget unzip bash`\n\n- Atmel DFPs (Device Family Packs).  A small script is included to\n  download and install these for you:  \n  `./make dfp`\n\n### Building\n\nUse the `make` script included in this repo.  Run `./make --help` for details\nabout how to use it.  In most cases though, you should be able to just run\n`./make` by itself to compile all available build targets.  Or give it a search\nterm to limit builds to only a few, like `./make hank boost` to build all\nfirmwares for Hanklights with optional boost drivers.\n\nThe compiled firmware goes into the `hex/` directory, ready to be used by any\nfirmware flashing program.\n\n\n## Customizing Settings Per User\n\nThe build can be [customized per user](docs/per-user-config.md) by placing\noverrides into the `users/myname/` directory and letting the build script know\nyour username.  That way, your favorite settings can be applied automatically\nwithout having to modify the original source files.\n\n\n## Flashing Programs\n\n### AVRdude\n\nUsually avrdude installs in a single command:\n\n`sudo apt install avrdude`\n\n### PyMCUprog\n\nIf you use `pymcuprog` to flash firmware, a few extras are needed:\n\n```sh\nsudo apt install python3 python3-pip python3-venv\npython3 -m venv .venv\nsource .venv/bin/activate\npip install pymcuprog\n```\n\nYou'll need to `source .venv/bin/activate` every time you start a fresh shell,\nif you want to use pymcuprog.  The activation lasts until the shell is\nclosed or until you run `deactivate`.\n\n\n## Contributing\n\nIf you'd like to help, there are several ways...\n\n  - ToyKeeper has a [Patreon site](https://patreon.com/ToyKeeper) for\n    donations, to help figuratively and literally keep the lights on.\n\n  - Send pull requests or patches, to improve things directly.  These can be\n    code, documentation, tools, or anything you think is useful.\n\n  - File bug reports for any problems you find.\n\n  - Answer people's questions on public forums.  If the same questions come up\n    a lot, consider adding it to the documentation here.\n\n  - Ask manufacturers to use this firmware, and to support its development.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FToyKeeper%2Fanduril","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FToyKeeper%2Fanduril","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FToyKeeper%2Fanduril/lists"}