Skip to main content

Simulates Pimoroni's Blinkt! using pygame.

Project description

Simulates Pimoroni’s Blinkt! allowing Blinkt! code to developed and tested on any computer.

Usage

try:
    import blinkt
except ImportError:
    import blinkt_sim as blinkt

Example Application

import time
import sys

try:
    import blinkt
    print("Blinkt! detected")
except ImportError:
    from blinkt_sim import blinkt_sim as blinkt
    print("Using Blinkt! simulator")

print("Press Ctrl+C to exit")

try:
    while True:
        for i in range(8):
            blinkt.clear()
            blinkt.set_pixel(i, 255, 0, 0, 0.75)
            blinkt.show()
            time.sleep(0.1)

except KeyboardInterrupt:  # Handle Ctrl+C gracefully
    sys.exit()

Credits

Thanks to Jannis Hermanns for creating the unicorn-hat-sim which was the inspiration for this project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blinkt-sim-1.0.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blinkt_sim-1.0.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file blinkt-sim-1.0.0.tar.gz.

File metadata

  • Download URL: blinkt-sim-1.0.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for blinkt-sim-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b571cc35a7a506965de67c988752c2b71f97fbf58dcca821d156227410521882
MD5 2255d1c433e9c4267fd6859c1e333990
BLAKE2b-256 0a27a8db4cc7cc99666dcb9f472b25cbf092b0e2e6e3ae87d547fa4f09bc7a82

See more details on using hashes here.

File details

Details for the file blinkt_sim-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for blinkt_sim-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a118fe110954270c5ec662ece5b40e009bf8e2bb285466c11105846272b875f
MD5 e2257f500ff3fd7ee1bed74fa281b15c
BLAKE2b-256 98d9b44d8b63f0b6b3cb19cd7d3505811cb60473f846eddb9bd8d3adb90f0834

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page