Skip to content

A seperate DND status would be great #26

@semeif

Description

@semeif

First of all I love this project and the implementation was really smooth!
I started playing with the unicorn HAT in between and created a simple DND (3 lines red, 2 lines white, 3 lines red) But I'm really bad in python and don't know where to implement the additional status.
Here is my code for the DND status:

unicorn.set_layout(unicorn.AUTO)
unicorn.rotation(90) # tested on pHAT/HAT with rotation 0, 90, 180 & 270
unicorn.brightness(0.5)
width,height=unicorn.get_shape()
red = [0,1,2,5,6,7]
white =[3,4]

for y in red:
for x in range(width):
unicorn.set_pixel(x,y,255,0,0)
unicorn.show()
time.sleep(0.05)

for y in white:
for x in range(width):
unicorn.set_pixel(x,y,255,255,255)
unicorn.show()
time.sleep(0.05)

unicorn.show()

=======================
time.sleep is just for animation purpose and not mandatory.

Maybe someone finds some time to implement this.

Cheers,
Sebastian

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions