How to use the inky.InkyMockP function in inky

To help you get started, we’ve selected a few inky examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pimoroni / inky / examples / logo-mock.py View on Github external
""")

# Command line arguments to set display type and colour

parser = argparse.ArgumentParser()
parser.add_argument('--type', '-t', type=str, required=True, choices=["what", "phat"], help="type of display")
parser.add_argument('--colour', '-c', type=str, required=True, choices=["red", "black", "yellow"], help="ePaper display colour")
args = parser.parse_args()

colour = args.colour

# Set up the correct display and scaling factors

if args.type == "phat":
    inky_display = InkyPHAT(colour=colour, v_flip=False)
elif args.type == "what":
    inky_display = InkyWHAT(colour)

inky_display.set_border(inky_display.BLACK)

# Pick the correct logo image to show depending on display type/colour

if args.type == "phat":
    if colour == 'black':
        img = Image.open("phat/resources/InkypHAT-212x104-bw.png")
    else:
        img = Image.open("phat/resources/InkypHAT-212x104.png")
elif args.type == "what":
    if colour == 'black':
        img = Image.open("what/resources/InkywHAT-400x300-bw.png")
    else:

inky

Inky pHAT Driver

MIT
Latest version published 2 months ago

Package Health Score

72 / 100
Full package analysis

Similar packages