#Initialisierung der Oxocard try: from machine import Pin, deepsleep, ADC, reset from globals import __np import time Pin(2, Pin.OUT).value(1) # audio ampli on Pin(15, Pin.OUT).value(0) # neopix on __np.set(37, 0xffff00, update = True) # Möglichkeit zum Ausschalten... for i in range(50): if Pin(13, Pin.IN, Pin.PULL_DOWN).value() == 1 and Pin(27, Pin.IN, Pin.PULL_DOWN).value() == 1: print("Power off") for k in [250, 100, 50, 20, 10, 5, 1, 0]: for i in range(8): __np.set(9*i+1, k << 16, update = False) __np.set(7*i+8, k << 16, update = False) __np.show() time.sleep(0.5) Pin(2, Pin.OUT).value(0) # audio ampli off Pin(15, Pin.OUT).value(1) # neopix off deepsleep() time.sleep(0.02) except ImportError: pass ################################### # Start vom eigentlichen Programm # ################################### from oxocard import * while True: # Art 0, gamma 2 matrix=(((12,15,17),(14,16,19),(60,37,22),(37,34,32),(66,40,24),(46,38,33),(12,15,18),(12,15,17),),((13,15,18),(30,33,36),(142,37,0),(49,18,4),(153,37,0),(82,32,8),(39,40,43),(21,23,26),),((45,36,30),(46,28,18),(80,21,1),(26,17,12),(117,28,0),(34,14,5),(85,24,2),(36,22,14),),((77,42,20),(128,30,0),(58,57,58),(57,53,50),(37,36,36),(52,51,51),(188,44,0),(45,24,14),),((25,21,19),(78,20,1),(70,58,50),(227,113,42),(190,109,56),(115,84,63),(30,11,3),(30,23,19),),((17,19,21),(38,38,38),(96,44,17),(251,122,42),(201,126,77),(105,47,17),(64,64,65),(7,8,10),),((4,5,6),(51,51,53),(87,55,34),(231,125,54),(100,75,62),(125,95,76),(49,50,51),(4,5,6),),((9,11,13),(13,15,17),(34,36,39),(34,22,15),(37,35,34),(29,32,34),(14,16,19),(9,11,13),),) image(matrix) sleep(1) # Art 0, gamma 1.4 matrix=(((30,35,39),(33,38,42),(92,66,46),(67,62,60),(100,70,49),(77,67,62),(31,35,40),(30,35,39),),((31,36,40),(57,60,65),(169,66,3),(80,40,15),(178,66,1),(115,60,24),(68,70,74),(44,48,51),),((76,65,57),(77,54,40),(113,45,6),(52,38,31),(147,55,3),(63,34,17),(119,49,8),(65,46,34),),((111,72,43),(158,57,3),(91,89,90),(89,84,82),(66,65,65),(84,82,83),(206,74,1),(76,50,34),),((50,44,42),(112,43,6),(104,90,82),(235,144,73),(208,140,89),(146,117,95),(57,29,12),(58,47,42),),((38,42,45),(67,67,68),(129,75,38),(252,152,72),(216,155,110),(137,78,39),(96,97,97),(21,24,26),),((14,16,18),(82,83,85),(121,88,63),(238,155,86),(133,109,94),(154,127,109),(81,81,82),(15,17,19),),((25,29,33),(31,35,39),(62,65,68),(62,46,36),(66,64,62),(56,59,62),(34,37,41),(25,29,33),),) image(matrix) sleep(1) # Art 1, gamma 2 matrix=(((12,15,18),(12,15,18),(20,13,9),(53,55,58),(37,25,18),(60,60,63),(12,15,18),(12,15,18),),((11,14,17),(17,19,22),(235,57,0),(39,9,0),(233,56,0),(44,13,2),(49,51,55),(25,29,31),),((33,33,33),(15,9,7),(193,46,0),(14,6,4),(227,56,0),(31,9,1),(121,29,0),(21,17,15),),((31,18,10),(125,29,0),(127,127,127),(25,25,25),(75,75,75),(135,134,137),(249,59,0),(21,9,6),),((41,41,43),(129,30,0),(166,168,168),(245,169,110),(222,160,112),(81,74,70),(37,8,0),(33,31,31),),((11,14,17),(55,55,55),(105,48,20),(253,184,128),(235,134,69),(158,73,29),(94,96,97),(2,3,4),),((0,1,1),(82,83,84),(62,31,15),(249,82,6),(45,40,40),(237,207,182),(51,51,51),(0,0,0),),((9,11,13),(9,11,13),(32,34,37),(11,9,9),(73,73,74),(20,23,25),(9,11,13),(9,11,13),),) image(matrix) sleep(1)