{"id":32784808,"url":"https://github.com/jinglemansweep/pixelart-clock","last_synced_at":"2026-05-03T11:35:23.956Z","repository":{"id":322501756,"uuid":"1087870103","full_name":"jinglemansweep/pixelart-clock","owner":"jinglemansweep","description":"Pixel Art Clock for Interstate 75W","archived":false,"fork":false,"pushed_at":"2025-11-04T19:45:32.000Z","size":559,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-04T21:18:09.127Z","etag":null,"topics":["claude-code","interstate75","micropython","pimonori","pimoroni","pixel-art","zx-spectrum"],"latest_commit_sha":null,"homepage":"","language":"Python","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/jinglemansweep.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-01T20:13:23.000Z","updated_at":"2025-11-04T19:45:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jinglemansweep/pixelart-clock","commit_stats":null,"previous_names":["jinglemansweep/pixelart-clock"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jinglemansweep/pixelart-clock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jinglemansweep%2Fpixelart-clock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jinglemansweep%2Fpixelart-clock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jinglemansweep%2Fpixelart-clock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jinglemansweep%2Fpixelart-clock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jinglemansweep","download_url":"https://codeload.github.com/jinglemansweep/pixelart-clock/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jinglemansweep%2Fpixelart-clock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32567483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"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":["claude-code","interstate75","micropython","pimonori","pimoroni","pixel-art","zx-spectrum"],"created_at":"2025-11-05T02:01:08.802Z","updated_at":"2026-05-03T11:35:23.944Z","avatar_url":"https://github.com/jinglemansweep.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🎨 Pixelart Clock\n\n\u003e A dynamic, scene-based clock for the **Pimoroni Interstate 75W** LED matrix display\n\nTransform your Interstate 75W into a living canvas that combines beautiful pixel art with time display. Whether you're nostalgic for 8-bit classics, love cyberpunk aesthetics, or want cozy winter scenes, this clock brings your LED matrix to life with smooth scrolling backgrounds, animated vector graphics, and a fully customizable scene system.\n\n## 📸 See It In Action\n\n\u003cdiv align=\"center\"\u003e\n\n![Retro Gaming Scene - Dizzy](docs/images/photo_dizzy.jpg)\n*Classic ZX Spectrum game scenes with smooth scrolling*\n\n![Cyberpunk Landscape](docs/images/photo_landscape.jpg)\n*Vibrant pixel art landscapes that slowly scroll across the display*\n\n![Retro Gaming - Sabrewulf](docs/images/photo_sabrewulf.jpg)\n*Nostalgic pixel art from beloved retro games*\n\n\u003c/div\u003e\n\n## ✨ Features\n\n- **🎬 Multiple Scene Types**: Static images, scrolling backgrounds, animated vector graphics, and more\n- **🌓 Day/Night Modes**: Automatic brightness control with dimmed night variants\n- **⏰ Smart Scheduling**: Configure when your display is on, in normal mode, or night mode\n- **🎮 Built-in Scenes**: Retro gaming scenes, cyberpunk landscapes, 3D cubes, Tetris, and Asteroids\n- **🎨 Easy Customization**: Add your own pixel art with simple configuration\n- **💾 Memory Efficient**: Designed for MicroPython's limited resources\n- **📅 Flexible Date/Time**: Customizable date and time formats with 12/24-hour support\n\n## 🖼️ Built-in Scenes\n\n### Vector Graphics Scenes\n\n#### **CubeScene** - 3D Wireframe Cubes\nRotating 3D wireframe cubes with color-cycling animation. Perfect for a hypnotic, geometric display.\n```python\n(\"CubeScene\", (), {\"num_cubes\": 3})\n```\n\n#### **TetrisScene** - Automated Tetris Simulation\nWatch Tetris pieces fall, rotate, and stack up automatically. Features all 7 classic Tetris shapes with random movements and automatic grid resets.\n```python\n(\"TetrisScene\", (), {\"fall_speed\": 0.1, \"reset_interval\": 60.0})\n```\n\n#### **AsteroidsScene** - Classic Asteroids Arcade Game\nExperience the classic Asteroids arcade game with an automated ship that thrusts, rotates, and fires lasers. Asteroids split into smaller pieces when destroyed, creating dynamic retro gameplay.\n```python\n(\"AsteroidsScene\", (), {\"num_asteroids\": 5})\n```\n\n**Features:**\n- Vector-based wireframe graphics (ship, asteroids, lasers)\n- Automated ship with 70% thrust frequency and 50% rotation frequency\n- Asteroids split on destruction: Large → Medium → Small\n- Fast-moving laser projectiles with collision detection\n- Screen-wrapping physics for authentic arcade feel\n- Perfect for night mode with cyan ship, gray asteroids, and yellow lasers\n\n### Image-Based Scenes\n\n#### **ScrollingImageScene** - Smooth Horizontal Scrolling\nPerfect for wide pixel art landscapes. Your image scrolls continuously across the display.\n```python\n(\"ScrollingImageScene\", (\"images/scene_neon_city.png\",), {\"scroll_speed\": 1})\n```\n\n#### **StaticImageScene** - Static Display\nDisplay your favorite pixel art without animation, great for detailed scenes you want to appreciate.\n```python\n(\"StaticImageScene\", (\"images/spectrum_dizzy.png\",), {})\n```\n\n### Included Pixel Art\n\nThe project includes several gorgeous pixel art scenes:\n\n- 🎮 **Retro Gaming**: Classic ZX Spectrum game scenes (Dizzy, Jetpac, Jet Set Willy, Sabrewulf)\n- 🌃 **Cyberpunk**: Neon city and purple sunset landscapes\n- 🚀 **Sci-Fi**: Future family scenes with vibrant colors\n- 🎄 **Seasonal**: Christmas-themed scenes (snow animals, winter bridge, cozy fireplace)\n\nEach image includes a night variant that automatically activates in night mode!\n\n## 🛠️ Hardware Requirements\n\n- **Pimoroni Interstate 75W** board\n- **2× HUB75 LED panels** (128×64 pixels each, arranged horizontally)\n- **Total display resolution**: 256×64 pixels\n- **WiFi connection** (for automatic time synchronization via NTP)\n- **MicroPython firmware** installed on the Interstate 75W\n\n## 🚀 Quick Start\n\n### 1. Install MicroPython Firmware\n\nFollow Pimoroni's guide to install MicroPython on your Interstate 75W:\nhttps://learn.pimoroni.com/article/getting-started-with-interstate-75\n\n### 2. Configure WiFi\n\nCreate a `secrets.py` file in the `src/` directory:\n\n```python\n# src/secrets.py\nWIFI_SSID = \"YourNetworkName\"\nWIFI_PASSWORD = \"YourPassword\"\n```\n\n\u003e ⚠️ **Note**: `secrets.py` is gitignored by default to protect your credentials.\n\n### 3. Deploy to Your Board\n\nCopy all files from the `src/` directory to the root of your Interstate 75W:\n\n**Using Thonny IDE:**\n1. Open Thonny and connect to your Interstate 75W\n2. Navigate to the `src/` directory\n3. Select all files and \"Upload to /\"\n\n**Using mpremote:**\n```bash\nmpremote connect /dev/ttyACM0 cp -r src/* :\n```\n\n**Using rshell:**\n```bash\nrshell -p /dev/ttyACM0\n\u003e cp -r src/* /pyboard/\n```\n\n### 4. Reset and Enjoy!\n\nPress the reset button on your Interstate 75W or power cycle it. The clock will:\n1. Connect to WiFi\n2. Sync time via NTP\n3. Start displaying scenes with date/time overlay\n\n## 🎨 Adding Your Own Pixel Art\n\n### Step 1: Prepare Your Image\n\nCreate or find pixel art that fits the display:\n- **Format**: PNG\n- **Dimensions**: 256×64 pixels (exact)\n- **Style**: High contrast works best on LED matrices\n- **Tip**: Use 2× or 4× scale during creation, then resize to 256×64 for crisp pixels\n\n### Step 2: Create Night Variant (Optional)\n\nFor automatic night mode dimming, create a darker version:\n\n```bash\n# Using ImageMagick\nconvert my_scene.png -modulate 30 my_scene_night.png\n\n# Or with slight desaturation for a warmer night look\nconvert my_scene.png -modulate 40,80,100 my_scene_night.png\n```\n\n### Step 3: Add to Project\n\nPlace your images in `src/images/`:\n```\nsrc/images/\n├── my_scene.png\n├── my_scene_night.png  (optional)\n```\n\n### Step 4: Configure Scene\n\nEdit `src/config.py` and add your scene to the `SCENES` list:\n\n```python\nSCENES = [\n    # Scrolling scene (great for wide landscapes)\n    (\"ScrollingImageScene\", (\"images/my_scene.png\",), {\"scroll_speed\": 1}),\n\n    # Static scene (for detailed artwork)\n    (\"StaticImageScene\", (\"images/my_scene.png\",), {}),\n\n    # Day-only scene (9am-6pm)\n    (\"ScrollingImageScene\", (\"images/daytime_scene.png\",), {}, \"day\"),\n\n    # Night-only scene (6pm-9pm)\n    (\"StaticImageScene\", (\"images/stars.png\",), {}, \"night\"),\n\n    # ... other scenes\n]\n```\n\n### Scene Configuration Options\n\nEach scene is defined as a tuple with 4 elements:\n\n1. **Scene Type** (required): `\"ScrollingImageScene\"`, `\"StaticImageScene\"`, `\"CubeScene\"`, `\"TetrisScene\"`\n2. **Arguments** (required): Positional args like image path\n3. **Keyword Arguments** (required): Dictionary of options (can be empty `{}`)\n4. **Time Preference** (optional): `\"day\"`, `\"night\"`, or `None` (both)\n\n**Examples:**\n\n```python\n# Basic scrolling scene\n(\"ScrollingImageScene\", (\"images/city.png\",), {})\n\n# Faster scrolling\n(\"ScrollingImageScene\", (\"images/city.png\",), {\"scroll_speed\": 2})\n\n# Static night-only scene\n(\"StaticImageScene\", (\"images/stars.png\",), {}, \"night\")\n\n# Multiple cubes\n(\"CubeScene\", (), {\"num_cubes\": 5})\n\n# Faster Tetris with quick reset\n(\"TetrisScene\", (), {\"fall_speed\": 0.05, \"reset_interval\": 30.0})\n```\n\n## ⚙️ Configuration\n\n### Display Modes \u0026 Scheduling\n\nConfigure when your display is active in `src/config.py`:\n\n```python\nMODE_SCHEDULE = {\n    9: \"normal\",   # 9am: Full brightness, show \"day\" scenes\n    21: \"night\",   # 9pm: Dimmed mode, show \"night\" scenes\n    23: \"off\"      # 11pm: Display off\n}\n```\n\n**Modes:**\n- **normal**: Full brightness, shows scenes marked \"day\" or None\n- **night**: Dimmed colors (30% by default), shows scenes marked \"night\" or None\n- **off**: Display turns off completely\n\n### Scene Rotation\n\nControl how scenes transition:\n\n```python\nSCENE_DURATION = 60        # Seconds per scene\nSCENE_SELECTION = \"sequential\"  # or \"random\"\n```\n\n### Date/Time Formats\n\nCustomize how date and time are displayed:\n\n```python\nTIME_FORMAT = \"HH:MM\"              # 24-hour: \"14:30\"\n# TIME_FORMAT = \"hh:MM AP\"         # 12-hour: \"02:30 PM\"\n# TIME_FORMAT = \"HH:MM:SS\"         # With seconds: \"14:30:45\"\n\nDATE_FORMAT = \"DDD DD/MM/YYYY\"     # \"Mon 15/01/2024\"\n# DATE_FORMAT = \"DDDD, MMMM D, YYYY\"  # \"Monday, January 15, 2024\"\n# DATE_FORMAT = \"MM/DD/YYYY\"          # US format: \"01/15/2024\"\n```\n\n### Night Mode Brightness\n\nAdjust the dimming factor for night mode:\n\n```python\nNIGHT_MODE_DIM_FACTOR = 0.3  # 30% brightness (range: 0.0-1.0)\n```\n\n## 🧩 Creating Custom Scenes\n\nWant to create your own animated scenes? It's easy!\n\n### 1. Create Scene Class\n\nCreate a new file `src/scenes/my_scene.py`:\n\n```python\nfrom .base import Scene\nimport config\n\nclass MyCustomScene(Scene):\n    def __init__(self, display, png_decoder, display_mode=None):\n        super().__init__(display, png_decoder)\n        self.display_mode = display_mode if display_mode is not None else \"normal\"\n\n        # Your initialization code here\n        self.x = 0\n        self.color = (255, 100, 0)\n\n    def update(self, delta_time):\n        \"\"\"Update animation state\"\"\"\n        self.x += 1\n        if self.x \u003e self.width:\n            self.x = 0\n\n    def render(self):\n        \"\"\"Draw to the display\"\"\"\n        r, g, b = self.color\n\n        # Dim colors in night mode\n        if self.display_mode == \"night\":\n            r, g, b = config.dim_color(r, g, b)\n\n        pen = self.display.create_pen(r, g, b)\n        self.display.set_pen(pen)\n        self.display.circle(self.x, 32, 10)\n\n    def cleanup(self):\n        \"\"\"Clean up resources when scene ends\"\"\"\n        pass\n```\n\n### 2. Register Your Scene\n\nAdd to `src/scenes/__init__.py`:\n\n```python\nfrom .my_scene import MyCustomScene\n```\n\n### 3. Add to Configuration\n\nIn `src/config.py`:\n\n```python\nSCENES = [\n    (\"MyCustomScene\", (), {}),\n    # ... other scenes\n]\n```\n\n## 📁 Project Structure\n\n```\npixelart-clock/\n├── src/                       # MicroPython code (deploy this to board)\n│   ├── main.py               # Entry point\n│   ├── config.py             # Configuration\n│   ├── secrets.py            # WiFi credentials (gitignored)\n│   ├── scene_manager.py      # Scene transitions\n│   ├── hud.py                # Time/date overlay\n│   ├── time_utils.py         # Time formatting utilities\n│   ├── images/               # Your pixel art scenes\n│   └── scenes/               # Scene modules\n│       ├── base.py           # Base Scene class\n│       ├── scrolling_image.py\n│       ├── static_image.py\n│       ├── cube.py\n│       └── tetris.py\n├── docs/                     # Documentation and photos\n├── examples/                 # Example code\n├── CLAUDE.md                 # Developer documentation\n└── README.md                 # This file\n```\n\n## 🔧 Troubleshooting\n\n### WiFi Won't Connect\n- Double-check `secrets.py` credentials\n- Ensure your network is 2.4GHz (5GHz not supported by Pico W)\n- Check that your WiFi SSID and password don't have special characters\n\n### Display Shows Nothing\n- Verify HUB75 panels are properly connected\n- Check that power supply can handle both panels (5V, 2-4A recommended)\n- Ensure panels are configured for 256×64 total resolution\n\n### Images Look Wrong\n- Confirm images are exactly 256×64 pixels\n- Use PNG format (JPEG not supported)\n- Reduce color count for better LED rendering\n- Try increasing contrast for better visibility\n\n### Scene Won't Show Up\n- Check that the image path in `config.py` matches your file\n- Verify the scene tuple has all required elements\n- Look for errors in Thonny's REPL console\n\n## 🎓 Resources\n\n- [Interstate 75W Getting Started Guide](https://learn.pimoroni.com/article/getting-started-with-interstate-75)\n- [Pico Graphics Documentation](https://github.com/pimoroni/pimoroni-pico/blob/main/micropython/modules/picographics/README.md)\n- [HUB75 Display Information](https://learn.pimoroni.com/article/what-is-a-hub75-display)\n\n## 🖼️ Pixel Art Resources\n\nLooking for more pixel art for your clock?\n\n- [Pixilart](https://www.pixilart.com/) - Community pixel art gallery\n- [OpenGameArt](https://opengameart.org/) - Free game assets\n- [Lospec](https://lospec.com/gallery) - Pixel art gallery with color palette tools\n- [itch.io](https://itch.io/game-assets/free/tag-pixel-art) - Free pixel art assets\n\n**Tips for finding good pixel art:**\n- Search for \"256x64 pixel art\" or \"pixel art landscape\"\n- Look for high contrast art (works better on LEDs)\n- Retro game screenshots often work great\n- Consider creating your own with tools like [Aseprite](https://www.aseprite.org/) or [Piskel](https://www.piskelapp.com/)\n\n## 🙏 Image Credits\n\nThe included pixel art scenes come from various talented artists:\n\n- **Snow Animals**: [Pixilart](https://es.pixilart.com/art/pt-1-2e17d5993766b9d?ft=topic\u0026ft_id=16)\n- **Winter Bridge**: [Pixilart](https://es.pixilart.com/art/white-hour-sr2508e39df1caws3?ft=topic\u0026ft_id=16)\n- **Xmas Fireplace**: [Pixilart](https://es.pixilart.com/art/warm-room-5b82aa29b81e99f?ft=topic\u0026ft_id=16)\n- **Retro Game Scenes**: Screenshots from classic ZX Spectrum games\n- **Cyberpunk Landscapes**: Various pixel art sources\n\n## 📝 License\n\nThis project is released under the GNU General Public License. See [LICENSE](LICENSE) for details.\n\n## 🤝 Contributing\n\nContributions are welcome! Feel free to:\n- Add new scene types\n- Create new pixel art scenes\n- Improve documentation\n- Report bugs or request features\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**Made with ❤️ for the Interstate 75W**\n\n*Turn your LED matrix into art*\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjinglemansweep%2Fpixelart-clock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjinglemansweep%2Fpixelart-clock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjinglemansweep%2Fpixelart-clock/lists"}