{"id":31177762,"url":"https://github.com/ankitkk/cosmic-unicorn","last_synced_at":"2026-05-18T09:07:45.230Z","repository":{"id":312482009,"uuid":"1047617650","full_name":"ankitkk/cosmic-unicorn","owner":"ankitkk","description":"LED Transit Tracker + Weather. ","archived":false,"fork":false,"pushed_at":"2025-08-30T22:23:52.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-19T14:38:11.147Z","etag":null,"topics":["chicago","led","micropython","pimoroni","trains"],"latest_commit_sha":null,"homepage":"","language":"Python","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/ankitkk.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-30T20:26:48.000Z","updated_at":"2025-08-30T22:52:38.000Z","dependencies_parsed_at":"2025-08-31T00:28:34.990Z","dependency_job_id":null,"html_url":"https://github.com/ankitkk/cosmic-unicorn","commit_stats":null,"previous_names":["ankitkk/cosmic-unicorn"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ankitkk/cosmic-unicorn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankitkk%2Fcosmic-unicorn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankitkk%2Fcosmic-unicorn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankitkk%2Fcosmic-unicorn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankitkk%2Fcosmic-unicorn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ankitkk","download_url":"https://codeload.github.com/ankitkk/cosmic-unicorn/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankitkk%2Fcosmic-unicorn/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33172173,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T05:43:36.989Z","status":"ssl_error","status_checked_at":"2026-05-18T05:43:19.133Z","response_time":71,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["chicago","led","micropython","pimoroni","trains"],"created_at":"2025-09-19T14:07:50.909Z","updated_at":"2026-05-18T09:07:45.210Z","avatar_url":"https://github.com/ankitkk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chicago Transit Authority Tracker + Weather LED Display\n\nA MicroPython app for [Pimoroni Cosmic Unicorn](https://shop.pimoroni.com/products/space-unicorns?variant=40842626596947) (32x32 LED) that rotates between a weather screen and CTA bus arrival countdowns. It themes colors by day/night, syncs time via NTP, and handles Wi-Fi setup with a minimal on-device status UI.\n\n\u003cimg width=\"450\" height=\"300\" alt=\"image\" src=\"https://github.com/user-attachments/assets/d6d5f419-46bd-4e84-ab16-2fccd476c1fe\" /\u003e\n\n## Features\n- Weather: local time, current temp (°F, colorized), hi/lo or condition\n- Transit: three configurable CTA rows with 3-char rotating tokens\n- Theme: smooth day/night blending and per-mode brightness\n- Transitions: brightness crossfade + sliding animation between screens\n- Networking: resilient Wi-Fi connect flow with NTP sync\n- Morning preference: between 08:00–10:00 local, shows the CTA screen longer\n\n## Hardware\n- Pimoroni Cosmic Unicorn (RP2040 + 32x32 RGB LED matrix)\n- Runs on MicroPython (Pico W firmware)\n\n## Setup\n1. Dependencies on device (typical):\n   - `cosmic`, `picographics` (from Pimoroni MicroPython build)\n   - `urequests` (HTTP client; usually bundled in the build)\n2. Secrets:\n   - Create `lib/secrets.py` with: `WIFI_SSID`, `WIFI_PASSWORD`, `CTA_API_KEY`\n3. Configure routes/weather in `config.py`:\n   - Update `ROWS` for stop/route/direction/color.\n   - Set `LAT`, `LON`, and `TZ` for your location.\n   - Tune screen timings, brightness, and themes as needed.\n\n## Running\n- Entrypoint: `main.py` runs `app.main()`. On boot, the app:\n  - Connects Wi-Fi and forces an initial NTP sync\n  - Fetches weather and CTA data\n  - Enters the main loop, rotating between screens with transitions\n\n## Configuration Highlights\n- Morning CTA preference in `config.py`:\n  - `MORNING_CTA_START_HOUR = 8`\n  - `MORNING_CTA_END_HOUR = 10`\n  - `MORNING_CTA_MULTIPLIER = 2.5` (CTA duration multiplier during morning window)\n- Base durations in `config.py`:\n  - `WEATHER_SCREEN_SECONDS`, `CTA_SCREEN_SECONDS`\n- Theme presets and dusk blending:\n  - `THEMES`, `DUSK_WINDOW_MIN`, `THEME_CHECK_MS`\n\n## Notes\n- WIFI credentials/CTA API key are loaded from `lib/secrets.py` (not in repo).\n- Weather API: Open-Meteo (no key needed).\n- Pens are memoized to reduce GC churn and improve performance.\n\n## Troubleshooting\n- If Wi-Fi repeatedly times out, credentials may be wrong; app displays status.\n- If time appears wrong at boot, ensure Wi-Fi is reachable for NTP.\n- If CTA screen is blank or `NOA`, API may be unreachable or key missing.\n\n## License\nThis project is licensed under the [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankitkk%2Fcosmic-unicorn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fankitkk%2Fcosmic-unicorn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankitkk%2Fcosmic-unicorn/lists"}