Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

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.

Files for blinkt-sim, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size blinkt_sim-1.0.0-py3-none-any.whl (4.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size blinkt-sim-1.0.0.tar.gz (2.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page