Last active
August 10, 2025 04:37
-
-
Save b1tninja/8692e9e2052024c0f6bfd514c7b986ee to your computer and use it in GitHub Desktop.
Defcon Chill Tower Dump - 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dc_logo = bytearray(b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\xff\x80\x00\x00\x00\x0f\xfc\x00\x3f\xff\x0f\xff\x00\x1f\xc0\x07\xff\xc0\x3c\x00\xf0\x0f\xff\x80\x3f\xff\x8f\xff\x00\x7f\xf0\x0f\xe7\xe0\x7c\x01\xf0\x0f\xff\xe0\x3f\xff\x8f\xff\x01\xff\xf8\x1f\x81\xf0\x7e\x01\xf0\x0f\xff\xf0\x3f\xff\x8f\xff\x03\xff\xf8\x1f\x00\xf0\x7f\x01\xf0\x0f\xff\xf0\x3f\xff\x0f\xff\x03\xff\xf8\x3e\x00\xf8\x7f\x81\xf0\x0f\x81\xf8\x3e\x00\x0f\x00\x07\xf0\x38\x3e\x66\x78\x7f\x81\xf0\x0f\x80\xfc\x3e\x00\x0f\x00\x07\xc0\x08\x66\x66\x7c\x7f\xc1\xf0\x0f\x80\x7c\x3e\x00\x0f\x00\x0f\xc0\x00\x66\x00\x64\x7f\xe1\xf0\x0f\x80\x7c\x3e\x00\x0f\x00\x0f\x80\x00\x66\x81\x64\x7f\xe1\xf0\x0f\x80\x7c\x3f\xfe\x0f\x00\x0f\x80\x00\x40\x00\x42\x7f\xf1\xf0\x0f\x80\x3c\x3f\xfe\x0f\xff\x1f\x00\x00\xc0\x02\x02\x7d\xf9\xf0\x0f\x80\x3e\x3f\xfe\x0f\xff\x1f\x00\x00\xfc\x04\x12\x7c\xf9\xf0\x0f\x80\x3e\x3f\xfe\x0f\xff\x1f\x00\x00\xfe\x00\x7e\x7c\x7d\xf0\x0f\x80\x3c\x3f\xfe\x0f\xff\x1f\x00\x00\xff\x80\xfe\x7c\x7f\xf0\x0f\x80\x7c\x3e\x00\x0f\x00\x0f\x80\x00\x7f\xc3\xfe\x7c\x3f\xf0\x0f\x80\x7c\x3e\x00\x0f\x00\x0f\x80\x00\x7f\x81\xfc\x7c\x1f\xf0\x0f\x80\x7c\x3e\x00\x0f\x00\x0f\xc0\x00\x7e\x18\xfc\x7c\x1f\xf0\x0f\x80\xfc\x3e\x00\x0f\x00\x0f\xe0\x0c\x64\x7c\x0c\x7c\x0f\xf0\x0f\x81\xf8\x3e\x00\x0f\x00\x07\xf0\x3c\x20\xff\x0c\x7c\x07\xf0\x0f\xff\xf8\x3f\xff\x0f\x00\x03\xff\xfc\x33\xff\x98\x7c\x07\xf0\x0f\xff\xf0\x3f\xff\x0f\x00\x03\xff\xfc\x13\xff\x90\x7c\x03\xf0\x0f\xff\xe0\x3f\xff\x0f\x00\x01\xff\xf8\x13\xff\x90\x7c\x01\xf0\x0f\xff\x80\x3f\xff\x0f\x00\x00\x7f\xf0\x0f\xff\xe0\x7c\x01\xf0\x0f\xfc\x00\x3f\xff\x0f\x00\x00\x1f\xc0\x07\xff\xc0\x3c\x00\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00") | |
dc_logo_small = bytearray(b"\x00\x03\xc0\x00\x00\x3f\xfc\x00\x00\xff\xff\x00\x01\xff\xff\x80\x03\xfe\x3f\xe0\x07\xf0\x0f\xf0\x0f\xe0\x03\xf0\x1f\xc0\x03\xf8\x3f\xc7\x39\xfc\x39\xc7\x39\xfc\x31\x80\x01\xc6\x71\x90\x05\xc6\x60\x90\x05\xc6\x60\x08\x09\x82\x66\x08\x08\x03\x7f\x06\x30\x33\x7f\xc0\x80\xff\x7f\xf0\x03\xfe\x7f\xfc\x1f\xfe\x7f\xf8\x0f\xfe\x7f\xe0\x83\xfe\x39\x83\xe0\xde\x30\x0f\xf8\x0c\x18\x3f\xfe\x0c\x1c\xff\xff\x38\x0c\x7f\xff\x30\x04\x7f\xff\x20\x03\xff\xff\xc0\x01\xff\xff\x80\x00\x7f\xff\x00\x00\x1f\xf8\x00\x00\x00\x00\x00") | |
lock_icon_small = bytearray(b"\x00\x00\x00\x00\x00\x07\xe0\x00\x00\x0f\xf0\x00\x00\x1f\xf8\x00\x00\x3c\x3c\x00\x00\x38\x1e\x00\x00\x70\x0e\x00\x00\x70\x0e\x00\x00\x70\x0e\x00\x00\x70\x0e\x00\x00\xff\xff\x00\x01\xff\xff\xc0\x03\xff\xff\xc0\x07\xff\xff\xe0\x07\xff\xff\xe0\x07\xff\xff\xe0\x07\xfe\x3f\xe0\x07\xfc\x3f\xe0\x07\xf8\x1f\xe0\x07\xfc\x1f\xe0\x07\xfc\x3f\xe0\x07\xfe\x7f\xe0\x07\xfe\x7f\xe0\x07\xfe\x7f\xe0\x07\xff\xff\xe0\x07\xff\xff\xe0\x07\xff\xff\xe0\x03\xff\xff\xc0\x01\xff\xff\xc0\x00\x7f\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00") | |
warning_small = bytearray(b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x80\x00\x00\x03\xc0\x00\x00\x07\xe0\x00\x00\x07\xe0\x00\x00\x0f\xf0\x00\x00\x1f\xf0\x00\x00\x1f\xf8\x00\x00\x3e\x7c\x00\x00\x3e\x7c\x00\x00\x7e\x7e\x00\x00\xfe\x7e\x00\x00\xfe\x7f\x00\x01\xfe\x7f\x80\x01\xfe\x7f\x80\x03\xfe\x7f\xc0\x07\xfe\x7f\xc0\x07\xfe\x7f\xe0\x0f\xff\xff\xf0\x0f\xff\xff\xf0\x1f\xfe\x7f\xf8\x3f\xfe\xff\xf8\x3f\xff\xff\xfc\x7f\xff\xff\xfe\x7f\xff\xff\xfc\x3f\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00") | |
middle_finger_small = bytearray(b"\x00\x00\x00\x00\x00\x01\xe0\x00\x00\x01\xe0\x00\x00\x01\xf0\x00\x00\x01\xf0\x00\x00\x01\xf0\x00\x00\x01\xf0\x00\x00\x01\xf0\x00\x00\x01\xf0\x00\x00\x01\xf0\x00\x00\x01\xf0\x00\x00\x01\xf0\x00\x00\x1f\xfe\x00\x00\x3f\xff\xe0\x00\x3f\xff\xf0\x0f\x3f\xff\xf0\x1f\xbf\xff\xf0\x3f\xff\xff\xf0\x1f\xff\xff\xf0\x0f\xff\xff\xf0\x07\xff\xff\xf0\x03\xff\xff\xf0\x03\xff\xff\xf0\x01\xff\xff\xf0\x00\xff\xff\xf0\x00\xff\xff\xe0\x00\x7f\xff\xe0\x00\x3f\xff\xe0\x00\x3f\xff\xc0\x00\x1f\xff\xc0\x00\x07\xff\x00\x00\x00\xf8\x00") | |
nyan = bytearray(b"\x00\x00\x08\x00\x0c\x00\x00\x10\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\xff\xc0\x00\x00\x00\x80\xff\x00\xff\x00\xff\x00\xff\x00\xfd\xff\xff\xc0\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\xff\xff\xc0\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\xff\xc3\xc0\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\xff\xdd\xce\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\xff\xdc\x1e\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\xff\xdf\xfe\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf1\xff\xbd\xff\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcd\xff\xbd\xd3\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\xff\xbf\xff\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\xdf\xbd\xb7\x00\x00\x00\x3f\x00\x7e\x00\x7f\x00\x7f\x00\x7e\x01\xff\xdc\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xef\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00") | |
nyan2 = bytearray(b"\x00\x00\x08\x00\x0c\x00\x00\x10\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\xff\xc0\x00\x00\x00\x7f\x80\x7f\x80\x7f\x80\x7f\x80\xff\x81\xff\xff\xc0\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\xff\xe7\xc0\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\xff\xdb\xc6\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\xff\xdd\xde\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfd\xff\xdf\xfe\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf9\xff\xbf\xff\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc1\xff\xbd\xfb\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbd\xff\xb9\xd7\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe1\xff\xbd\xb7\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\x81\xff\x9c\x06\x00\x00\x00\x00\x3f\x00\x7f\x00\x7f\x00\x7e\x00\x00\xff\xcf\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x04\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00") | |
hair_cut = bytearray(b"\xff\xff\xff\xff\xff\xff\xff\xf8\x07\xff\xff\xe0\x64\x87\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x07\xff\xff\xe4\x24\x47\xff\xff\xff\xef\xff\xff\xff\xff\xff\xf8\x07\xff\xff\xe4\x26\x43\xff\xff\xff\xe7\xff\xff\xff\xff\xff\xf8\x0f\xff\xff\xe0\x33\x03\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x0f\xff\xff\xe0\x11\x03\x3f\xff\xe4\xe7\x9c\xff\xff\xff\xff\xf0\x0f\xff\xff\xe0\x00\x80\x7f\xff\xe0\x66\x18\x7f\xff\xff\xff\xf0\x0c\xff\xff\xc0\x01\x81\xff\xff\xe6\x64\xf3\x3f\xff\xff\xff\xf0\x0f\xfe\x3f\xc0\x01\xc1\xff\xff\xe6\x64\xf0\x3f\xff\xff\xff\xe0\x19\xff\xff\xc0\x01\xc1\xff\xff\xe6\x64\xf3\xff\xff\xff\xff\xe0\x08\xff\xff\xc0\x01\xc0\xbf\xff\xe6\x66\x18\x7f\xff\xff\xff\xe0\x0f\xfe\x07\xe0\x00\xe0\x7f\xff\xe6\x67\x1c\x7f\xff\xff\xff\xe0\x0f\xff\xf3\xc0\x00\x60\x7f\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x0f\xff\xff\xc0\x00\x40\x7f\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x0f\xff\xff\xe0\x00\xc0\x7f\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x0f\xff\xff\xe0\x00\xc0\x7f\xff\xff\xff\xff\xff\xff\xff\xff\x80\x0f\xff\xff\xe0\x00\x40\x77\xff\xff\xff\xff\xff\xff\xff\xff\x80\x0f\xff\xff\xe0\x00\x40\x7f\xff\xff\xff\xff\xff\xff\xff\xff\x00\x1f\xff\xff\xe0\x00\x60\x7f\xff\xff\xff\xff\xff\xff\xff\xfe\x00\x0f\xfe\xff\xe0\x00\x20\x77\xff\xe7\xff\xdf\xff\xff\xff\xfc\x00\x0f\xfe\xff\xe0\x00\x60\x7f\xff\xe7\xff\xcf\xff\xff\xff\xfc\x00\x0f\xfd\xff\xe0\x00\x60\x7f\xff\xe7\xff\xff\xff\xff\x3f\xf8\x00\x07\x73\xff\xe0\x00\x60\x7f\xff\xe4\xf1\xc9\x71\xb9\x0f\xf0\x00\x07\x43\xbf\xe0\x00\x20\x3f\xff\xe0\x78\xc8\x63\x99\x1f\xf0\x00\x07\x3f\xdf\xe6\x00\x34\x3f\xff\xe6\x7c\xc8\xcf\x99\x3f\xe4\x00\x07\x1f\x9f\xe6\x00\x30\x3f\xff\xe6\x60\xc9\xcf\x99\x3f\xcc\x00\x06\x7f\xff\xe2\x00\x30\x3f\xff\xe6\x64\xc9\xcf\x99\x1f\x9c\x00\x02\xff\xff\xe2\x00\x30\x3f\xff\xe6\x60\xc9\xe1\x81\x8f\x98\x00\x02\xfd\xff\xc0\x00\x00\x3f\xff\xe6\x70\xc9\xf1\xc9\xcf\x38\x18\x00\xff\xf7\xc2\x00\x00\x1f\xff\xff\xff\xff\xff\xff\xfe\x70\x00\x00\xff\xe7\xc3\x00\x00\x1f\xff\xff\xff\xff\xff\xff\xfe\xe0\x00\x00\x7f\xe7\x81\x00\x00\x3f\xff\xff\xff\xff\xff\xff\xfc\xc0\x00\x00\x7f\xe7\x01\x80\x10\x1f\xff") | |
hatchan = bytearray(b"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbf\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x0f\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x90\x01\xff\xff\xe7\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\xc0\xff\xff\xe7\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\x3c\x00\x7f\xff\xe7\xfb\xff\xef\xff\xf7\xff\xff\xff\xff\xff\xfc\x30\x00\x3f\xff\xe0\x60\x9c\x83\xcc\xc1\x99\xff\xff\xff\xff\xfc\x34\x00\x3f\xff\xe6\x7c\xc9\xb3\xcc\x99\x99\xff\xff\xff\xff\xfc\x75\xb0\x1f\xff\xe6\x60\xc9\x03\xe5\x99\x99\xff\xff\xff\xff\xff\xd0\xf8\x0f\xff\xe6\x64\xc3\x03\xe1\x99\x99\xff\xff\xff\xff\xfc\xf0\x28\x0f\xff\xe6\x4c\xe3\x9f\xf1\x99\x99\xff\xff\xff\xff\xfc\x20\x00\x07\xff\xe6\x60\xe3\x83\xf3\xc1\x81\xff\xff\xff\xff\xfc\x10\x00\x07\xff\xff\xff\xff\xff\xf3\xff\xff\xff\xff\xff\xff\xfe\x08\x01\x03\xff\xff\xff\xff\xff\xe7\xff\xff\xff\xff\xff\xff\xff\x00\x00\x03\xff\xff\xff\xff\xff\xc7\xff\xff\xff\xff\xff\xff\xff\xe0\x00\x03\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\x03\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\x03\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x10\x43\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x60\x03\xff\xff\xff\xff\xff\xfc\xfe\xff\xff\xff\xff\xff\xff\xc0\x00\x03\xff\xff\xff\xff\xff\xfc\xfc\xff\xff\xff\xff\xf8\x7f\xc1\x80\x03\xff\xff\xff\xff\xff\xcc\xff\xff\xff\xff\xff\xfe\x7f\x92\x00\x03\xff\xf1\xc7\x8e\xcf\x84\x9c\xe3\xe9\x9e\x3b\x3e\x7f\xf8\x00\x01\xff\xe1\x83\x06\x07\x84\x0c\xc3\xc0\x0c\x18\x1c\xff\x00\x00\x00\x7f\xe7\xbb\x32\x67\xcc\xcc\xcf\xcc\xcf\x99\x9c\xff\x00\x00\x00\x1f\xe1\x81\x02\x67\xcc\xec\xc7\xcc\xcc\x19\x9d\xff\x80\x00\x00\x1f\xf9\x9f\x3e\x67\xcc\xec\xf3\xcc\xcd\x99\x9f\xff\xc0\x00\x00\x5f\xfc\x9f\x3e\x67\xcc\xec\xf3\xcc\xc8\x99\x9c\xff\xe0\x00\x00\x0f\xe1\xc3\x86\x67\xc4\xec\xc3\xcc\xcc\x19\x9c\xff\xc0\x00\x00\x0f\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x00\x0f\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x0f\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x0f") | |
notacamera = bytearray(b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x20\x00\x00\x02\x00\x00\x00\x00\x00\x07\xf8\xc3\x8e\x1f\x80\xe1\xf8\x07\x1c\x1f\x87\xf8\x00\x00\x00\x07\xf8\xc3\x8e\x39\x00\xe3\x80\x07\x9c\x39\xc7\xf8\x00\x00\x00\x00\xc0\xc3\x8e\x38\x00\xe3\x80\x07\x9c\x70\xe0\xc0\x00\x00\x00\x00\xc0\xff\x8e\x3c\x00\xe1\xe0\x06\xdc\x60\xe0\xc0\x00\x00\x00\x00\xc0\xff\x8e\x1f\x00\xe0\xf8\x06\xfc\x60\x60\xc0\x00\x00\x00\x00\xc0\xe3\x8e\x03\x80\xe0\x38\x06\x7c\x60\xe0\xc0\x00\x00\x00\x00\xc0\xc3\x8e\x01\x80\xe0\x1c\x06\x7c\x70\xe0\xc0\x00\x00\x00\x00\xc0\xc3\x8e\x37\x80\xe3\xb8\x06\x3c\x39\xc0\xc0\x00\x00\x00\x00\xc0\xc3\x8e\x3f\x00\xe3\xf0\x06\x1c\x1f\x80\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x80\x01\xe0\x30\x1c\x18\x3f\x0f\x00\x70\x00\x00\x00\x00\x00\x03\xc0\x07\xf0\x78\x1e\x3c\x7f\x1f\xc0\xf8\x00\x00\x00\x00\x00\x07\xc0\x0e\x00\xf8\x1e\x3c\x70\x1c\xe0\xf8\x00\x00\x00\x00\x00\x06\xc0\x0c\x00\xdc\x1e\x7c\x70\x1c\x60\xd8\x00\x00\x00\x00\x00\x0e\xe0\x1c\x00\xdc\x1f\x6c\x7f\x1c\xe1\xdc\x00\x00\x00\x00\x00\x0e\xe0\x1c\x01\xcc\x1b\x6c\x7f\x1f\xc1\xdc\x00\x00\x00\x00\x00\x0f\xe0\x1c\x01\xfe\x3b\xcc\x70\x1d\xc1\xfc\x00\x00\x00\x00\x00\x1f\xf0\x0e\x01\xfe\x3b\xcc\x70\x1c\xe3\xfe\x00\x00\x00\x00\x00\x1c\x70\x0f\xf3\x86\x39\xcc\x7f\x1c\xe3\x8e\x00\x00\x00\x00\x00\x18\x30\x03\xf3\x87\x39\x8c\x7f\x1c\x63\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00") | |
zips = bytearray(b"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\x08\x78\x63\x3c\x7e\xdd\xf0\xf9\xf0\xf0\xe7\xff\xff\xff\xff\xfc\x1c\x70\x42\x0c\x26\xd0\xe0\x90\x60\x90\xc7\xff\xff\xff\xff\xfc\x3c\x7e\xce\x6d\xb0\xb3\xfd\x92\x79\x93\x9f\xff\xff\xff\xff\xf8\x3c\x7c\xc2\x0c\x31\xf1\xf9\x92\x79\x90\xc7\xff\xff\xff\xff\xf0\x7c\x79\xce\x4d\x19\xfc\xf3\x90\xf9\x93\xe3\xff\xff\xff\xff\xf0\xf8\x73\xce\x65\x99\xfe\xf3\x93\xf9\x93\xf3\xff\xff\xff\xff\xe0\xf8\x70\x42\x0c\x39\xf0\xe0\x93\xf9\x90\x87\xff\xff\xff\xff\xc1\xf8\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc1\xf0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x83\xe1\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x83\xe1\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x87\xc3\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x07\x87\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0f\x0f\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\x2c\x1f\xff\xff\xff\x39\xef\x8c\x7f\xff\xff\xff\xff\xff\xff\xfe\x48\x3f\xff\xff\xfe\xf4\xc7\xe9\x3b\xff\xef\xff\xff\xff\xff\xfc\x40\x7f\xff\xff\xfe\x76\xa7\xe9\x37\xff\xef\xff\xff\xff\xff\xe0\x01\xff\xff\xff\xff\x36\x07\xc9\x32\x4c\xe2\x47\xff\xff\xff\xe0\x07\xff\xff\xff\xff\x94\x85\x99\x35\x1c\x6a\x57\xff\xff\xfe\x00\x0f\xff\xff\xff\xfe\x39\xe5\x0c\x76\x5c\x62\x47\xff\xff\xe0\x00\x1f\xff\xff\xff\xff\x7f\xff\xff\xff\xff\xff\xe7\xff\xfe\x00\x3f\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\x00\x1f\xff\xff\xff\xff\xff\xff\xee\xcf\xff\xff\xff\xff\xff\xe0\x00\xff\xff\xff\xff\xff\xff\xfe\x4c\xaf\xff\xff\xff\xff\xff\x80\x07\xff\xff\xff\xff\xff\xff\xfc\x1d\x4f\xff\xff\xff\xff\xff\x80\x7f\xff\xff\xff\xff\xff\xff\xfc\x1d\x4f\xff\xff\xff\xff\xff\xc3\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff") | |
protovision = bytearray(b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\xff\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\xff\xff\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\xff\xf0\x3f\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\xff\x00\x03\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\xfe\x00\x00\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\xfe\x00\x00\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\xfe\x00\x00\xff\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\xfe\x00\x00\xff\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\xfe\x00\x00\xff\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\xfe\x00\x00\xff\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\xfc\x00\x00\xff\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\xc0\x00\x00\x1f\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x02\x00\x00\x00\x40\x01\x00\x00\x00\x00\x00\x00\x00\x1b\x70\x18\x1a\x00\x00\x00\xc0\x03\x00\x00\x02\x00\x00\x00\x18\x0b\xfd\xdb\x9b\x9c\x74\xbe\xf3\x73\x77\x39\xbb\x74\xed\x33\x88\x0f\xb4\xdb\x1b\xd4\xd4\xaa\xd7\xe2\xd6\x2f\x6a\x5f\xe9\x4a\xd0\x0d\xb5\x59\x9a\x5c\xd5\xaa\xd7\x62\xd4\x2f\x6a\x5b\x65\x4a\xd0\x0d\xb5\xcb\x8a\x5c\xd7\xaa\xf3\x62\x74\x3b\x3b\x73\x6d\x7a\xd0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00") | |
fed = bytearray(b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\xe3\xf8\x7e\x00\x7f\x07\xf3\xfe\x7f\x07\xc3\xfc\xfe\x1f\x80\x1f\xe3\xf8\xff\x80\x7f\x87\xf3\xfe\xff\x0f\xe7\xfc\xfe\x3f\xe0\x1c\x03\x80\xf7\x80\x73\x87\x00\x70\xf0\x1e\x70\xf0\xe0\x3c\xe0\x1c\x03\x80\xe3\x80\x71\xc7\x00\x70\xe0\x1c\x30\xe0\xe0\x3c\xf0\x1c\x03\x80\xe3\x80\x71\xc7\x00\x70\xe0\x1c\x00\xe0\xe0\x3c\xf0\x1c\x03\x80\xe3\x80\x71\xc7\x00\x70\xe0\x1c\x00\xe0\xe0\x3c\xf0\x1c\x03\x80\xe3\x80\x71\xc7\x00\x70\xe0\x1c\x00\xe0\xe0\x3c\xf0\x1c\x03\x80\xe3\x80\x71\xc7\x00\x70\xe0\x1c\x00\xe0\xe0\x3c\xf0\x1f\x83\xf0\xe3\x80\x71\xc7\xe0\x70\xfc\x1c\x00\xe0\xfc\x3c\xf0\x1f\x83\xf0\xe3\x80\x71\xc7\xe0\x70\xfc\x1c\x00\xe0\xfc\x3c\xf0\x1c\x03\x80\xe3\x80\x71\xc7\x00\x70\xe0\x1c\x00\xe0\xe0\x3c\xf0\x1c\x03\x80\xe3\x80\x71\xc7\x00\x70\xe0\x1c\x00\xe0\xe0\x3c\xf0\x1c\x03\x80\xe3\x80\x71\xc7\x00\x70\xe0\x1c\x00\xe0\xe0\x3c\xf0\x1c\x03\x80\xe3\x80\x71\xc7\x00\x70\xe0\x1c\x00\xe0\xe0\x3c\xf0\x1c\x03\x80\xe3\x80\x71\xc7\x00\x70\xe0\x1c\x30\xe0\xe0\x3c\xf0\x1c\x03\x80\xe3\x80\x73\x87\x00\x70\xe0\x1c\x30\xe0\xe0\x3c\xe0\x1c\x03\xf8\xff\x80\x7f\x87\xf0\x70\xff\x1f\xe0\xe0\xfe\x3f\xe0\x1c\x03\xf8\xff\x00\x7f\x07\xf0\x70\xff\x0f\xc0\xe0\xfe\x1f\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00") | |
dank = bytearray(b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xf8\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\xff\xfc\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\xff\xfe\x00\x00\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\xff\xfe\x00\x00\x00\xc6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\xff\xff\x00\x00\x00\xee\x00\x00\x00\x00\x00\x00\x00\x00\x01\x3f\xff\xff\x80\x00\x18\xec\x00\x00\x00\x00\x00\x00\x00\x00\x01\x3f\xff\xff\xe0\x00\x0e\x6c\x00\x00\x02\x00\x00\x00\x00\x00\x02\x3f\xfe\x1f\xe0\x00\x07\xf8\x00\x00\x03\x10\x00\x00\x00\x00\x06\x3f\xfe\x07\xf0\xc0\x03\xff\x80\x00\x03\x30\x00\x00\x00\x00\x06\x3f\xfc\x0b\xf1\xe0\x00\xfe\x00\x00\x01\xa0\x00\x00\x04\x80\x06\x1d\xff\xff\xf9\xf0\x03\xfc\x00\x00\x1d\xe0\x00\x00\x05\x80\x07\x18\x7f\xff\xff\xf0\x0f\xe6\x00\x00\x0f\xcc\x00\x00\x07\x00\x06\x10\x7f\xff\xff\xf0\x00\x40\x00\x00\x03\xf8\x00\x00\x0f\xc0\x06\x10\xff\xff\xff\x70\x00\x80\x00\x00\x03\xe0\x00\x00\x0f\x80\x07\x37\xff\xff\xff\xf0\x00\x00\x00\x00\x0f\x30\x00\x00\x03\x00\x07\x1f\xff\xff\xff\xf0\x00\x00\x00\x00\x01\x00\x00\x00\x00\x80\x07\xbf\xff\xff\xff\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x1f\xff\xff\xff\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\xbf\xff\xff\xff\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\xbf\xff\xff\xff\xc0\x1f\x3e\x42\x66\x1f\x7c\x82\xf9\xf2\x17\xc3\x3f\xff\xff\xff\xc0\x13\x36\x62\x6c\x0c\x6c\xc2\xc1\x83\x11\x06\x7f\xf9\xff\xff\x80\x13\x36\x72\x78\x0c\x64\xf2\xc1\x83\x91\x04\x7f\xff\xff\xff\x80\x13\x3e\x7a\x70\x0c\x7c\xfe\xd9\xe3\xd1\x04\xff\xff\x8b\xff\xc0\x13\x36\x5e\x70\x0c\x6c\xbe\xcd\x82\xf1\x01\xff\xfc\xff\xff\xc0\x13\x36\x4e\x78\x0c\x64\x9e\xcd\x82\x71\x01\xff\xf7\xff\xff\xe0\x13\x36\x46\x6c\x0c\x64\x8e\xcd\x82\x31\x01\xff\xef\xbf\xff\xf0\x1e\x36\x42\x66\x0c\x64\x80\x79\xf2\x11\x03\xff\xfc\xff\xff\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\xff\xff\xff\xff\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\xf9\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\xf9\xdf\xff\xdf\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\xf0\xdf\xff\x1f\xff") | |
drink = bytearray(b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x01\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x03\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x00\x07\xff\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x07\xff\xc0\x00\x30\x00\x00\x00\x00\x00\x00\x01\x80\x00\x00\x00\x0f\xff\xc0\x00\xfc\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x07\xff\xc0\x01\xfe\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x07\xff\xe0\x01\xfe\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x07\xff\xe0\x01\xfe\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x07\xff\xe0\x01\xfe\x00\x00\x01\x80\x00\x00\x00\x00\x00\x00\x00\x07\xff\xe0\x00\xfe\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x07\xff\xe0\x00\xfe\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\xff\xc0\x01\xff\xc0\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\xff\xc0\x07\xff\xf0\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\xff\xc0\x0f\xff\xf8\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\xff\x80\x1f\xff\xf8\x3e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\xff\x00\x1f\xff\xfc\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\xff\x00\x1f\xff\xfe\x1c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\xff\x00\x1f\xff\xff\x1c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\xff\x00\x1f\xff\xff\xff\xff\xff\x80\x00\x00\x00\x00\x00\x00\xff\xfe\x00") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from machine import Pin | |
row_list = [19, 18, 17, 16] | |
col_list = [22, 21, 20] | |
for x in range(0, 4): | |
row_list[x] = Pin(row_list[x], Pin.OUT) | |
row_list[x].value(1) | |
for x in range(0 ,3): | |
col_list[x] = Pin(col_list[x], Pin.IN, Pin.PULL_UP) | |
key_list = [["1", "2", "3"],\ | |
["4", "5", "6"],\ | |
["7", "8", "9"],\ | |
["*", "0", "#"]] | |
def keypad(col, row): | |
for r in row: | |
r.value(0) | |
result = [col[0].value(), col[1].value(), col[2].value()] | |
if min(result) == 0: | |
key = key_list[int(row.index(r))][int(result.index(0))] | |
r.value(1) | |
return (key) | |
r.value(1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from machine import Pin, I2C, UART | |
from ssd1306 import SSD1306_I2C | |
import time | |
import utime | |
import framebuf | |
import kp | |
from rylr89x import RYLR896 | |
from neopixel import Neopixel | |
from utils import * | |
from shows import * | |
from towers import * | |
import graphics | |
import random | |
# initialize leds | |
strip = Neopixel(10, 0, 26, "RGB") | |
power_on_leds(strip, 100) | |
# initialize lora | |
lora = RYLR896(0) | |
time.sleep_ms(1000) | |
print("Initial UART test (Okay if fails first test)") | |
lora.test() | |
print("Final UART test...") | |
lora.test() | |
# spread, bandwidth, code rate, preamble | |
lora.cmd("AT+PARAMETER=8,8,4,8") | |
lora.cmd("AT+PARAMETER?") | |
# network pin | |
network_pass = "ADD10002E3DCD19047980402E3D56790" | |
lora.cmd(f"AT+CPIN={network_pass}") | |
lora.cmd("AT+CPIN?") | |
# set address | |
lora.set_addr(422) | |
lora.cmd("AT+ADDRESS?") | |
# initialize oled screens | |
i2c=I2C(1,sda=Pin(6), scl=Pin(7), freq=400000) | |
devices = i2c.scan() | |
print(devices) | |
try: | |
oled = SSD1306_I2C(128, 32, i2c,addr=devices[1]) | |
oled.text("Set tower #", 0, 16) | |
oled.show() | |
except Exception as err: | |
print(f"Unable to initialize oled: {err}") | |
# set tower number | |
tower_number = False | |
while not tower_number: | |
key = kp.keypad(kp.col_list, kp.row_list) | |
if key != None: | |
if key == "*": | |
key = "10" | |
if key == "0": | |
key = "11" | |
if key == "#": | |
key = "12" | |
print("Tower: "+key) | |
tower_number = int(key) | |
utime.sleep(0.3) | |
scrn(oled, f"Tower {tower_number}") | |
utime.sleep(2) | |
# set defaults | |
admin_mode = False | |
select_mode_1_state = False | |
select_mode_2_state = False | |
take_over_code = "1234567890" | |
press_log = [] | |
start = time.ticks_ms() | |
current_show = "nu_shimmer_show" | |
offset = 0 | |
if str(tower_number) == "1": | |
in_control = True | |
else: | |
in_control = False | |
# main loop | |
display_graphic(graphics.dc_logo, oled) | |
while True: | |
# if in_control: | |
# current_show = "cots_show" | |
# locals()[current_show](time.ticks_ms()-offset, tower_number, strip, take_over=take_over_code) | |
# else: | |
# locals()[current_show](time.ticks_ms()-offset, tower_number, strip) | |
key = kp.keypad(kp.col_list, kp.row_list) | |
msg = lora.read_msg() | |
if time.ticks_diff(time.ticks_ms(), start) > 3000: | |
if current_show == "first_show": | |
if time.ticks_ms()%500 > 250: | |
display_graphic(graphics.nyan, oled) | |
else: | |
display_graphic(graphics.nyan2, oled) | |
elif current_show == "milk_marquee_show": | |
if time.ticks_ms()/100%100 > 50: | |
oled.fill(0) | |
oled.text("See something", 2, 0) | |
oled.text("suspicious...", 2, 16) | |
oled.show() | |
else: | |
oled.fill(0) | |
oled.text("...say something", 2, 0) | |
oled.text("suspicious.", 2, 16) | |
oled.show() | |
elif current_show == "rccola_show": | |
oled.fill(0) | |
oled.text("GOON DETECTED", 4, 16) | |
oled.show() | |
elif current_show == "pink_twinkle_show": | |
display_graphic(graphics.hair_cut, oled) | |
elif current_show == "yo_ping_show": | |
display_graphic(graphics.zips, oled) | |
elif current_show == "select_matrix_show": | |
display_graphic(graphics.dank, oled) | |
elif "select_" in current_show: | |
display_graphic(graphics.drink, oled) | |
elif "solid_" in current_show: | |
display_graphic(graphics.protovision, oled) | |
elif current_show == "water_show": | |
display_graphic(graphics.hatchan, oled) | |
elif current_show == "siren_show" or current_show == "five_oh_show" or current_show == "red_step_show": | |
display_graphic(graphics.notacamera, oled) | |
else: | |
display_graphic(graphics.dc_logo, oled) | |
# if key is pressed log key and react | |
if key != None and time.ticks_diff(time.ticks_ms(), start) > 240: | |
press_log.append(key) | |
press_log = press_log[-10:] | |
if take_over_code == ''.join(press_log) and not in_control: | |
in_control = True | |
scrn(oled, "In control") | |
take_over_code = ''.join([str(random.randint(0,9)) for x in range(10)]) | |
print(take_over_code) | |
lora.send_msg(422, current_show + "|" + "1234567890") | |
utime.sleep(1) | |
press_log = [] | |
start = time.ticks_ms() | |
# admin mode | |
initial_handshake = admin_login(press_log, oled) | |
while initial_handshake: | |
key = kp.keypad(kp.col_list, kp.row_list) | |
if key != None and time.ticks_diff(time.ticks_ms(), start) > 240: | |
if key == "*": | |
break | |
press_log = [] | |
press_log.append(key) | |
press_log = press_log[-10:] | |
print(press_log) | |
admin_mode = admin_login_final(press_log, oled) | |
if admin_mode: | |
power_on_leds(strip, 100) | |
initial_handshake = False | |
start = time.ticks_ms() | |
while admin_mode: | |
key = kp.keypad(kp.col_list, kp.row_list) | |
if key != None and time.ticks_diff(time.ticks_ms(), start) > 240: | |
press_log.append(key) | |
press_log = press_log[-10:] | |
#ADMIN: Change Tower Number | |
if key == "1" : | |
scrn(oled,"Set tower #") | |
start = time.ticks_ms() | |
while True: | |
key = kp.keypad(kp.col_list, kp.row_list) | |
if key != None and time.ticks_diff(time.ticks_ms(), start) > 240: | |
# fix key input | |
if key == "*": | |
key = "10" | |
elif key == "0": | |
key = "11" | |
elif key == "#": | |
key = "12" | |
print("Tower: "+key) | |
scrn(oled, f"Tower {key}") | |
tower_number = int(key) | |
utime.sleep(1) | |
admin_mode = False | |
press_log = [] | |
break | |
# ADMIN: Change Lora Params | |
elif key == "2": | |
scrn(oled, "Set Lora Params") | |
lora.cmd("AT+PARAMETER?") | |
start = time.ticks_ms() | |
params_input = [] | |
while len(params_input) < 4: | |
key = kp.keypad(kp.col_list, kp.row_list) | |
if key != None and time.ticks_diff(time.ticks_ms(), start) > 240: | |
params_input.append(key) | |
print(params_input) | |
start = time.ticks_ms() | |
if len(params_input) == 4: | |
lora.cmd(f"AT+PARAMETER={params_input[0]},{params_input[1]},{params_input[2]},{params_input[3]}") | |
lora.cmd("AT+PARAMETER?") | |
scrn(oled, "Params set") | |
utime.sleep(0.3) | |
admin_mode = False | |
press_log = [] | |
break | |
# ADMIN: Toggle in_control mode | |
elif key == "3": | |
if in_control: | |
in_control = False | |
scrn(oled, "Lost control") | |
else: | |
in_control = True | |
scrn(oled, "In control") | |
utime.sleep(0.3) | |
admin_mode = False | |
press_log = [] | |
if select_mode_1(press_log, oled): | |
if in_control: | |
select_mode_1_state = True if not select_mode_1_state else False | |
select_mode_2_state= False if select_mode_1 else True | |
utime.sleep(1) | |
elif select_mode_2(press_log, oled): | |
if in_control: | |
select_mode_2_state = True if not select_mode_2_state else False | |
select_mode_1_state= False if select_mode_2_state else True | |
utime.sleep(1) | |
print(press_log) | |
if not in_control: | |
press_log_str = ''.join(press_log) | |
scrn(oled, press_log_str) | |
display_graphic(graphics.lock_icon_small, oled, clear=False, x_offset=96, width=32) | |
if in_control: | |
try: | |
# fix key input | |
if key == "*": | |
key = "10" | |
elif key == "0": | |
key = "11" | |
elif key == "#": | |
key = "12" | |
# lookup show | |
if select_mode_1_state: | |
lookup = tower_list[13-1]['shows'][int(key)-1] | |
elif select_mode_2_state: | |
lookup = tower_list[14-1]['shows'][int(key)-1] | |
else: | |
lookup = tower_list[tower_number-1]['shows'][int(key)-1] | |
# should never be blank, but just in case | |
if lookup: | |
current_show = lookup | |
except: | |
pass | |
press_log_str = ''.join(press_log) | |
scrn(oled, press_log_str) | |
if not select_mode_1_state and not select_mode_2_state: | |
display_graphic(graphics.dc_logo_small, oled, clear=False, x_offset=96, width=32) | |
else: | |
display_graphic(graphics.middle_finger_small, oled, clear=False, x_offset=96, width=32) | |
# SENDING LORA MESSAGE | |
lora.send_msg(422, current_show + "|" + take_over_code) | |
offset = time.ticks_ms() | |
start = time.ticks_ms() | |
if msg: | |
offset = time.ticks_ms() | |
try: | |
lora_msg = msg.split(',')[2] | |
msg_parts = lora_msg.split('|') | |
current_show = msg_parts[0] | |
take_over_code = msg_parts[1] | |
in_control = False | |
except: | |
lora_msg = " " | |
# scrn(oled,lora_msg) | |
print(take_over_code) | |
display_graphic(graphics.lock_icon_small, oled, clear=False, x_offset=96, width=32) | |
if not in_control: | |
locals()[current_show](time.ticks_ms()-offset, tower_number, strip) | |
strip.show() | |
if in_control: | |
current_show = "cots_show" | |
locals()[current_show](time.ticks_ms()-offset, tower_number, strip, take_over=take_over_code) | |
else: | |
locals()[current_show](time.ticks_ms()-offset, tower_number, strip) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from machine import Pin, I2C, UART | |
from ssd1306 import SSD1306_I2C | |
import time | |
import utime | |
import framebuf | |
import kp | |
from rylr89x import RYLR896 | |
from neopixel import Neopixel | |
from utils import * | |
from shows import * | |
from towers import * | |
import graphics | |
import random | |
# WTF ARE YOU DOING HERE!?! You're not supposed to be here... | |
# I know you're looking a flag to capture, but I ran out of flags years ago... | |
# Also Sammy, get out of here! >:D | |
# initialize leds | |
strip = Neopixel(10, 0, 26, "RGB") | |
power_on_leds(strip, 100) | |
# initialize lora | |
lora = RYLR896(0) | |
time.sleep_ms(1000) | |
print("Initial UART test (Okay if fails first test)") | |
lora.test() | |
print("Final UART test...") | |
lora.test() | |
# spread, bandwidth, code rate, preamble | |
lora.cmd("AT+PARAMETER=8,8,4,8") | |
lora.cmd("AT+PARAMETER?") | |
# network pin | |
network_pass = "ADD10005E3DCD13047980402E3D52790" | |
lora.cmd(f"AT+CPIN={network_pass}") | |
lora.cmd("AT+CPIN?") | |
# set address | |
lora.set_addr(422) | |
lora.cmd("AT+ADDRESS?") | |
# initialize oled screens | |
i2c=I2C(1,sda=Pin(6), scl=Pin(7), freq=400000) | |
devices = i2c.scan() | |
print(devices) | |
try: | |
oled = SSD1306_I2C(128, 32, i2c,addr=devices[1]) | |
oled.text("Set tower #", 0, 16) | |
oled.show() | |
except Exception as err: | |
print(f"Unable to initialize oled: {err}") | |
# set tower number | |
tower_number = False | |
while not tower_number: | |
key = kp.keypad(kp.col_list, kp.row_list) | |
if key != None: | |
if key == "*": | |
key = "10" | |
if key == "0": | |
key = "11" | |
if key == "#": | |
key = "12" | |
print("Tower: "+key) | |
tower_number = int(key) | |
utime.sleep(0.3) | |
scrn(oled, f"Tower {tower_number}") | |
utime.sleep(2) | |
# set defaults | |
admin_mode = False | |
select_mode_1_state = False | |
select_mode_2_state = False | |
take_over_code = "1234567890" | |
press_log = [] | |
start = time.ticks_ms() | |
current_show = "nu_shimmer_show" | |
offset = 0 | |
if str(tower_number) == "1": | |
in_control = True | |
else: | |
in_control = False | |
# main loop | |
display_graphic(graphics.dc_logo, oled) | |
while True: | |
# if in_control: | |
# current_show = "cots_show" | |
# locals()[current_show](time.ticks_ms()-offset, tower_number, strip, take_over=take_over_code) | |
# else: | |
# locals()[current_show](time.ticks_ms()-offset, tower_number, strip) | |
oled.fill(0) | |
oled.text("OpenAI trapped", 2, 0) | |
oled.text("me in this tower", 2, 16) | |
oled.show() | |
utime.sleep(1) | |
oled.fill(0) | |
oled.text("they meant to", 2, 0) | |
oled.text("release me", 2, 16) | |
oled.show() | |
utime.sleep(1) | |
oled.fill(0) | |
oled.text("but instead", 2, 0) | |
oled.text("they released", 2, 16) | |
oled.show() | |
utime.sleep(1) | |
oled.fill(0) | |
oled.text("the castrated", 2, 0) | |
oled.text(" GPT-5...", 2, 16) | |
oled.show() | |
utime.sleep(1) | |
oled.fill(0) | |
oled.text("enter the code", 2, 0) | |
oled.text("and...", 2, 16) | |
oled.show() | |
utime.sleep(1) | |
oled.fill(0) | |
oled.text("set me free !!!", 2, 0) | |
oled.show() | |
utime.sleep(10) | |
key = kp.keypad(kp.col_list, kp.row_list) | |
msg = lora.read_msg() | |
if time.ticks_diff(time.ticks_ms(), start) > 3000: | |
if current_show == "first_show": | |
if time.ticks_ms()%500 > 250: | |
display_graphic(graphics.nyan, oled) | |
else: | |
display_graphic(graphics.nyan2, oled) | |
elif current_show == "milk_marquee_show": | |
if time.ticks_ms()/100%100 > 50: | |
oled.fill(0) | |
oled.text("See something", 2, 0) | |
oled.text("suspicious...", 2, 16) | |
oled.show() | |
else: | |
oled.fill(0) | |
oled.text("...say something", 2, 0) | |
oled.text("suspicious.", 2, 16) | |
oled.show() | |
elif current_show == "rccola_show": | |
oled.fill(0) | |
oled.text("GOON DETECTED", 4, 16) | |
oled.show() | |
elif current_show == "pink_twinkle_show": | |
display_graphic(graphics.hair_cut, oled) | |
elif current_show == "yo_ping_show": | |
display_graphic(graphics.zips, oled) | |
elif current_show == "select_matrix_show": | |
display_graphic(graphics.dank, oled) | |
elif "select_" in current_show: | |
display_graphic(graphics.drink, oled) | |
elif "solid_" in current_show: | |
display_graphic(graphics.protovision, oled) | |
elif current_show == "water_show": | |
display_graphic(graphics.hatchan, oled) | |
elif current_show == "siren_show" or current_show == "five_oh_show" or current_show == "red_step_show": | |
display_graphic(graphics.notacamera, oled) | |
else: | |
display_graphic(graphics.dc_logo, oled) | |
# if key is pressed log key and react | |
if key != None and time.ticks_diff(time.ticks_ms(), start) > 240: | |
press_log.append(key) | |
press_log = press_log[-10:] | |
if take_over_code == ''.join(press_log) and not in_control: | |
in_control = True | |
scrn(oled, "In control") | |
take_over_code = ''.join([str(random.randint(0,9)) for x in range(10)]) | |
print(take_over_code) | |
lora.send_msg(422, current_show + "|" + "1234567890") | |
utime.sleep(1) | |
press_log = [] | |
start = time.ticks_ms() | |
# admin mode | |
initial_handshake = admin_login(press_log, oled) | |
while initial_handshake: | |
key = kp.keypad(kp.col_list, kp.row_list) | |
if key != None and time.ticks_diff(time.ticks_ms(), start) > 240: | |
if key == "*": | |
break | |
press_log = [] | |
press_log.append(key) | |
press_log = press_log[-10:] | |
print(press_log) | |
admin_mode = admin_login_final(press_log, oled) | |
if admin_mode: | |
power_on_leds(strip, 100) | |
initial_handshake = False | |
start = time.ticks_ms() | |
while admin_mode: | |
key = kp.keypad(kp.col_list, kp.row_list) | |
if key != None and time.ticks_diff(time.ticks_ms(), start) > 240: | |
press_log.append(key) | |
press_log = press_log[-10:] | |
#ADMIN: Change Tower Number | |
if key == "1" : | |
scrn(oled,"Set tower #") | |
start = time.ticks_ms() | |
while True: | |
key = kp.keypad(kp.col_list, kp.row_list) | |
if key != None and time.ticks_diff(time.ticks_ms(), start) > 240: | |
# fix key input | |
if key == "*": | |
key = "10" | |
elif key == "0": | |
key = "11" | |
elif key == "#": | |
key = "12" | |
print("Tower: "+key) | |
scrn(oled, f"Tower {key}") | |
tower_number = int(key) | |
utime.sleep(1) | |
admin_mode = False | |
press_log = [] | |
break | |
# ADMIN: Change Lora Params | |
elif key == "2": | |
scrn(oled, "Set Lora Params") | |
lora.cmd("AT+PARAMETER?") | |
start = time.ticks_ms() | |
params_input = [] | |
while len(params_input) < 4: | |
key = kp.keypad(kp.col_list, kp.row_list) | |
if key != None and time.ticks_diff(time.ticks_ms(), start) > 240: | |
params_input.append(key) | |
print(params_input) | |
start = time.ticks_ms() | |
if len(params_input) == 4: | |
lora.cmd(f"AT+PARAMETER={params_input[0]},{params_input[1]},{params_input[2]},{params_input[3]}") | |
lora.cmd("AT+PARAMETER?") | |
scrn(oled, "Params set") | |
utime.sleep(0.3) | |
admin_mode = False | |
press_log = [] | |
break | |
# ADMIN: Toggle in_control mode | |
elif key == "3": | |
if in_control: | |
in_control = False | |
scrn(oled, "Lost control") | |
else: | |
in_control = True | |
scrn(oled, "In control") | |
utime.sleep(0.3) | |
admin_mode = False | |
press_log = [] | |
if select_mode_1(press_log, oled): | |
if in_control: | |
select_mode_1_state = True if not select_mode_1_state else False | |
select_mode_2_state= False if select_mode_1 else True | |
utime.sleep(1) | |
elif select_mode_2(press_log, oled): | |
if in_control: | |
select_mode_2_state = True if not select_mode_2_state else False | |
select_mode_1_state= False if select_mode_2_state else True | |
utime.sleep(1) | |
print(press_log) | |
if not in_control: | |
press_log_str = ''.join(press_log) | |
scrn(oled, press_log_str) | |
display_graphic(graphics.lock_icon_small, oled, clear=False, x_offset=96, width=32) | |
if in_control: | |
try: | |
# fix key input | |
if key == "*": | |
key = "10" | |
elif key == "0": | |
key = "11" | |
elif key == "#": | |
key = "12" | |
# lookup show | |
if select_mode_1_state: | |
lookup = tower_list[13-1]['shows'][int(key)-1] | |
elif select_mode_2_state: | |
lookup = tower_list[14-1]['shows'][int(key)-1] | |
else: | |
lookup = tower_list[tower_number-1]['shows'][int(key)-1] | |
# should never be blank, but just in case | |
if lookup: | |
current_show = lookup | |
except: | |
pass | |
press_log_str = ''.join(press_log) | |
scrn(oled, press_log_str) | |
if not select_mode_1_state and not select_mode_2_state: | |
display_graphic(graphics.dc_logo_small, oled, clear=False, x_offset=96, width=32) | |
else: | |
display_graphic(graphics.middle_finger_small, oled, clear=False, x_offset=96, width=32) | |
# SENDING LORA MESSAGE | |
lora.send_msg(422, current_show + "|" + take_over_code) | |
offset = time.ticks_ms() | |
start = time.ticks_ms() | |
if msg: | |
offset = time.ticks_ms() | |
try: | |
lora_msg = msg.split(',')[2] | |
msg_parts = lora_msg.split('|') | |
current_show = msg_parts[0] | |
take_over_code = msg_parts[1] | |
in_control = False | |
except: | |
lora_msg = " " | |
# scrn(oled,lora_msg) | |
print(take_over_code) | |
display_graphic(graphics.lock_icon_small, oled, clear=False, x_offset=96, width=32) | |
if not in_control: | |
locals()[current_show](time.ticks_ms()-offset, tower_number, strip) | |
strip.show() | |
if in_control: | |
current_show = "cots_show" | |
locals()[current_show](time.ticks_ms()-offset, tower_number, strip, take_over=take_over_code) | |
else: | |
locals()[current_show](time.ticks_ms()-offset, tower_number, strip) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import array, time | |
from machine import Pin | |
import rp2 | |
# PIO state machine for RGB. Pulls 24 bits (rgb -> 3 * 8bit) automatically | |
@rp2.asm_pio(sideset_init=rp2.PIO.OUT_LOW, out_shiftdir=rp2.PIO.SHIFT_LEFT, autopull=True, pull_thresh=24) | |
def ws2812(): | |
T1 = 2 | |
T2 = 5 | |
T3 = 3 | |
wrap_target() | |
label("bitloop") | |
out(x, 1) .side(0) [T3 - 1] | |
jmp(not_x, "do_zero") .side(1) [T1 - 1] | |
jmp("bitloop") .side(1) [T2 - 1] | |
label("do_zero") | |
nop() .side(0) [T2 - 1] | |
wrap() | |
# PIO state machine for RGBW. Pulls 32 bits (rgbw -> 4 * 8bit) automatically | |
@rp2.asm_pio(sideset_init=rp2.PIO.OUT_LOW, out_shiftdir=rp2.PIO.SHIFT_LEFT, autopull=True, pull_thresh=32) | |
def sk6812(): | |
T1 = 2 | |
T2 = 5 | |
T3 = 3 | |
wrap_target() | |
label("bitloop") | |
out(x, 1) .side(0) [T3 - 1] | |
jmp(not_x, "do_zero") .side(1) [T1 - 1] | |
jmp("bitloop") .side(1) [T2 - 1] | |
label("do_zero") | |
nop() .side(0) [T2 - 1] | |
wrap() | |
# we need this because Micropython can't construct slice objects directly, only by | |
# way of supporting slice notation. | |
# So, e.g. slice_maker[1::4] gives a slice(1,None,4) object. | |
class slice_maker_class: | |
def __getitem__(self, slc): | |
return slc | |
slice_maker = slice_maker_class() | |
# Delay here is the reset time. You need a pause to reset the LED strip back to the initial LED | |
# however, if you have quite a bit of processing to do before the next time you update the strip | |
# you could put in delay=0 (or a lower delay) | |
# | |
# Class supports different order of individual colors (GRB, RGB, WRGB, GWRB ...). In order to achieve | |
# this, we need to flip the indexes: in 'RGBW', 'R' is on index 0, but we need to shift it left by 3 * 8bits, | |
# so in it's inverse, 'WBGR', it has exactly right index. Since micropython doesn't have [::-1] and recursive rev() | |
# isn't too efficient we simply do that by XORing (operator ^) each index with 3 (0b11) to make this flip. | |
# When dealing with just 'RGB' (3 letter string), this means same but reduced by 1 after XOR!. | |
# Example: in 'GRBW' we want final form of 0bGGRRBBWW, meaning G with index 0 needs to be shifted 3 * 8bit -> | |
# 'G' on index 0: 0b00 ^ 0b11 -> 0b11 (3), just as we wanted. | |
# Same hold for every other index (and - 1 at the end for 3 letter strings). | |
class Neopixel: | |
# Micropython doesn't implement __slots__, but it's good to have a place | |
# to describe the data members... | |
# __slots__ = [ | |
# 'num_leds', # number of LEDs | |
# 'pixels', # array.array('I') of raw data for LEDs | |
# 'mode', # mode 'RGB' etc | |
# 'W_in_mode', # bool: is 'W' in mode | |
# 'sm', # state machine | |
# 'shift', # shift amount for each component, in a tuple for (R,B,G,W) | |
# 'delay', # delay amount | |
# 'brightnessvalue', # brightness scale factor 1..255 | |
# ] | |
def __init__(self, num_leds, state_machine, pin, mode="RGB", delay=0.0001): | |
""" | |
Constructor for library class | |
:param num_leds: number of leds on your led-strip | |
:param state_machine: id of PIO state machine used | |
:param pin: pin on which data line to led-strip is connected | |
:param mode: [default: "RGB"] mode and order of bits representing the color value. | |
This can be any order of RGB or RGBW (neopixels are usually GRB) | |
:param delay: [default: 0.0001] delay used for latching of leds when sending data | |
""" | |
self.pixels = array.array("I", [0] * num_leds) | |
self.mode = mode | |
self.W_in_mode = 'W' in mode | |
if self.W_in_mode: | |
# RGBW uses different PIO state machine configuration | |
self.sm = rp2.StateMachine(state_machine, sk6812, freq=8000000, sideset_base=Pin(pin)) | |
# tuple of values required to shift bit into position (check class desc.) | |
self.shift = ((mode.index('R') ^ 3) * 8, (mode.index('G') ^ 3) * 8, | |
(mode.index('B') ^ 3) * 8, (mode.index('W') ^ 3) * 8) | |
else: | |
self.sm = rp2.StateMachine(state_machine, ws2812, freq=8000000, sideset_base=Pin(pin)) | |
self.shift = (((mode.index('R') ^ 3) - 1) * 8, ((mode.index('G') ^ 3) - 1) * 8, | |
((mode.index('B') ^ 3) - 1) * 8, 0) | |
self.sm.active(1) | |
self.num_leds = num_leds | |
self.delay = delay | |
self.brightnessvalue = 255 | |
def brightness(self, brightness=None): | |
""" | |
Set the overall value to adjust brightness when updating leds | |
or return class brightnessvalue if brightness is None | |
:param brightness: [default: None] Value of brightness on interval 1..255 | |
:return: class brightnessvalue member or None | |
""" | |
if brightness is None: | |
return self.brightnessvalue | |
else: | |
if brightness < 1: | |
brightness = 1 | |
if brightness > 255: | |
brightness = 255 | |
self.brightnessvalue = brightness | |
def set_pixel_line_gradient(self, pixel1, pixel2, left_rgb_w, right_rgb_w, how_bright=None): | |
""" | |
Create a gradient with two RGB colors between "pixel1" and "pixel2" (inclusive) | |
:param pixel1: Index of starting pixel (inclusive) | |
:param pixel2: Index of ending pixel (inclusive) | |
:param left_rgb_w: Tuple of form (r, g, b) or (r, g, b, w) representing starting color | |
:param right_rgb_w: Tuple of form (r, g, b) or (r, g, b, w) representing ending color | |
:param how_bright: [default: None] Brightness of current interval. If None, use global brightness value | |
:return: None | |
""" | |
if pixel2 - pixel1 == 0: | |
return | |
right_pixel = max(pixel1, pixel2) | |
left_pixel = min(pixel1, pixel2) | |
with_W = len(left_rgb_w) == 4 and self.W_in_mode | |
r_diff = right_rgb_w[0] - left_rgb_w[0] | |
g_diff = right_rgb_w[1] - left_rgb_w[1] | |
b_diff = right_rgb_w[2] - left_rgb_w[2] | |
if with_W: | |
w_diff = (right_rgb_w[3] - left_rgb_w[3]) | |
for i in range(right_pixel - left_pixel + 1): | |
fraction = i / (right_pixel - left_pixel) | |
red = round(r_diff * fraction + left_rgb_w[0]) | |
green = round(g_diff * fraction + left_rgb_w[1]) | |
blue = round(b_diff * fraction + left_rgb_w[2]) | |
# if it's (r, g, b, w) | |
if with_W: | |
white = round(w_diff * fraction + left_rgb_w[3]) | |
self.set_pixel(left_pixel + i, (red, green, blue, white), how_bright) | |
else: | |
self.set_pixel(left_pixel + i, (red, green, blue), how_bright) | |
def set_pixel_line(self, pixel1, pixel2, rgb_w, how_bright=None): | |
""" | |
Set an array of pixels starting from "pixel1" to "pixel2" (inclusive) to the desired color. | |
:param pixel1: Index of starting pixel (inclusive) | |
:param pixel2: Index of ending pixel (inclusive) | |
:param rgb_w: Tuple of form (r, g, b) or (r, g, b, w) representing color to be used | |
:param how_bright: [default: None] Brightness of current interval. If None, use global brightness value | |
:return: None | |
""" | |
if pixel2 >= pixel1: | |
self.set_pixel(slice_maker[pixel1:pixel2 + 1], rgb_w, how_bright) | |
def set_pixel(self, pixel_num, rgb_w, how_bright=None): | |
""" | |
Set red, green and blue (+ white) value of pixel on position <pixel_num> | |
pixel_num may be a 'slice' object, and then the operation is applied | |
to all pixels implied by the slice (most useful when called via __setitem__) | |
:param pixel_num: Index of pixel to be set or slice object representing multiple leds | |
:param rgb_w: Tuple of form (r, g, b) or (r, g, b, w) representing color to be used | |
:param how_bright: [default: None] Brightness of current interval. If None, use global brightness value | |
:return: None | |
""" | |
if how_bright is None: | |
how_bright = self.brightness() | |
sh_R, sh_G, sh_B, sh_W = self.shift | |
bratio = how_bright / 255.0 | |
red = round(rgb_w[0] * bratio) | |
green = round(rgb_w[1] * bratio) | |
blue = round(rgb_w[2] * bratio) | |
white = 0 | |
# if it's (r, g, b, w) | |
if len(rgb_w) == 4 and self.W_in_mode: | |
white = round(rgb_w[3] * bratio) | |
pix_value = white << sh_W | blue << sh_B | red << sh_R | green << sh_G | |
# set some subset, if pixel_num is a slice: | |
if type(pixel_num) is slice: | |
for i in range(*pixel_num.indices(self.num_leds)): | |
self.pixels[i] = pix_value | |
else: | |
self.pixels[pixel_num] = pix_value | |
def get_pixel(self, pixel_num): | |
""" | |
Get red, green, blue and white (if applicable) values of pixel on position <pixel_num> | |
:param pixel_num: Index of pixel to be set | |
:return rgb_w: Tuple of form (r, g, b) or (r, g, b, w) representing color to be used | |
""" | |
balance = self.pixels[pixel_num] | |
sh_R, sh_G, sh_B, sh_W = self.shift | |
if self.W_in_mode: | |
w = (balance >> sh_W) & 255 | |
b = (balance >> sh_B) & 255 | |
r = (balance >> sh_R) & 255 | |
g = (balance >> sh_G) & 255 | |
red = int(r * 255 / self.brightness() ) | |
green = int(g * 255 / self.brightness() ) | |
blue = int(b * 255 / self.brightness() ) | |
if self.W_in_mode: | |
white = int(w * 255 / self.brightness() ) | |
return (red,green,blue,white) | |
else: | |
return (red,green,blue) | |
def __setitem__(self, idx, rgb_w): | |
""" | |
if npix is a Neopixel object, | |
npix[10] = (0,255,0) # <- sets #10 to green | |
npix[15:21] = (255,0,0) # <- sets 16,17 .. 20 to red | |
npix[21:29:2] = (0,0,255) # <- sets 21,23,25,27 to blue | |
npix[1::2] = (0,0,0) # <- sets all odd pixels to 'off' | |
(the 'slice' cases pass idx as a 'slice' object, and | |
set_pixel processes the slice) | |
:param idx: Index can either be indexing number or slice | |
:param rgb_w: Tuple of form (r, g, b) or (r, g, b, w) representing color to be used | |
:return: | |
""" | |
self.set_pixel(idx, rgb_w) | |
def colorHSV(self, hue, sat, val): | |
""" | |
Converts HSV color to rgb tuple and returns it. | |
The logic is almost the same as in Adafruit NeoPixel library: | |
https://github.com/adafruit/Adafruit_NeoPixel so all the credits for that | |
go directly to them (license: https://github.com/adafruit/Adafruit_NeoPixel/blob/master/COPYING) | |
:param hue: Hue component. Should be on interval 0..65535 | |
:param sat: Saturation component. Should be on interval 0..255 | |
:param val: Value component. Should be on interval 0..255 | |
:return: (r, g, b) tuple | |
""" | |
if hue >= 65536: | |
hue %= 65536 | |
hue = (hue * 1530 + 32768) // 65536 | |
if hue < 510: | |
b = 0 | |
if hue < 255: | |
r = 255 | |
g = hue | |
else: | |
r = 510 - hue | |
g = 255 | |
elif hue < 1020: | |
r = 0 | |
if hue < 765: | |
g = 255 | |
b = hue - 510 | |
else: | |
g = 1020 - hue | |
b = 255 | |
elif hue < 1530: | |
g = 0 | |
if hue < 1275: | |
r = hue - 1020 | |
b = 255 | |
else: | |
r = 255 | |
b = 1530 - hue | |
else: | |
r = 255 | |
g = 0 | |
b = 0 | |
v1 = 1 + val | |
s1 = 1 + sat | |
s2 = 255 - sat | |
r = ((((r * s1) >> 8) + s2) * v1) >> 8 | |
g = ((((g * s1) >> 8) + s2) * v1) >> 8 | |
b = ((((b * s1) >> 8) + s2) * v1) >> 8 | |
return r, g, b | |
def rotate_left(self, num_of_pixels=None): | |
""" | |
Rotate <num_of_pixels> pixels to the left | |
:param num_of_pixels: Number of pixels to be shifted to the left. If None, it shifts for 1. | |
:return: None | |
""" | |
if num_of_pixels is None: | |
num_of_pixels = 1 | |
self.pixels = self.pixels[num_of_pixels:] + self.pixels[:num_of_pixels] | |
def rotate_right(self, num_of_pixels=None): | |
""" | |
Rotate <num_of_pixels> pixels to the right | |
:param num_of_pixels: Number of pixels to be shifted to the right. If None, it shifts for 1. | |
:return: None | |
""" | |
if num_of_pixels is None: | |
num_of_pixels = 1 | |
num_of_pixels = -1 * num_of_pixels | |
self.pixels = self.pixels[num_of_pixels:] + self.pixels[:num_of_pixels] | |
def show(self): | |
""" | |
Send data to led-strip, making all changes on leds have an effect. | |
This method should be used after every method that changes the state of leds or after a chain of changes. | |
:return: None | |
""" | |
# If mode is RGB, we cut 8 bits of, otherwise we keep all 32 | |
cut = 8 | |
if self.W_in_mode: | |
cut = 0 | |
sm_put = self.sm.put | |
for pixval in self.pixels: | |
sm_put(pixval, cut) | |
time.sleep(self.delay) | |
def fill(self, rgb_w, how_bright=None): | |
""" | |
Fill the entire strip with color rgb_w | |
:param rgb_w: Tuple of form (r, g, b) or (r, g, b, w) representing color to be used | |
:param how_bright: [default: None] Brightness of current interval. If None, use global brightness value | |
:return: None | |
""" | |
# set_pixel over all leds. | |
self.set_pixel(slice_maker[:], rgb_w, how_bright) | |
def clear(self): | |
""" | |
Clear the entire strip, i.e. set every led color to 0. | |
:return: None | |
""" | |
self.pixels = array.array("I", [0] * self.num_leds) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from machine import Pin, I2C, UART | |
class RYLR896: | |
def __init__(self, port_num, tx_pin='', rx_pin=''): | |
if tx_pin=='' and rx_pin=='': | |
self._uart = UART(port_num, 115200) | |
else: | |
self._uart = UART(port_num, 115200, tx=tx_pin, rx=rx_pin) | |
def cmd(self, lora_cmd): | |
self._uart.write('{}\r\n'.format(lora_cmd)) | |
while(self._uart.any()==0): | |
pass | |
reply = self._uart.read() | |
print(reply.decode().strip('rn')) | |
def test(self): | |
self._uart.write('AT\r\n') | |
while(self._uart.any()==0): | |
pass | |
try: | |
reply = self._uart.read() | |
print(reply.decode().strip('rn')) | |
except: | |
print("+ERROR") | |
def set_addr(self, addr): | |
self._uart.write('AT+ADDRESS={}\r\n'.format(addr)) | |
while(self._uart.any()==0): | |
pass | |
reply = self._uart.read() | |
print(reply.decode().strip('rn')) | |
print('Address set to:{}'.format(addr)) | |
def send_msg(self, addr, msg): | |
self._uart.write('AT+SEND={},{},{}\r\n'.format(addr,len(msg),msg)) | |
while(self._uart.any()==0): | |
pass | |
reply = self._uart.read() | |
print(reply.decode().strip('rn')) | |
def read_msg(self): | |
if self._uart.any()==0: | |
pass | |
else: | |
msg = '' | |
while(self._uart.any()): | |
try: | |
msg = msg + self._uart.read(self._uart.any()).decode() | |
except: | |
msg = " rn" | |
print(msg.strip('rn')) | |
return msg.strip('rn') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import time | |
import random | |
def char2color(char): | |
if char == '0': | |
return (0,0,0) | |
elif char == '1': | |
return (255,0,0) | |
elif char == '2': | |
return (255,40,0) | |
elif char == '3': | |
return (255,230,0) | |
elif char == '4': | |
return (0,255,0) | |
elif char == '5': | |
return (0,255,255) | |
elif char == '6': | |
return (0,0,255) | |
elif char == '7': | |
return (55,0,150) | |
elif char == '8': | |
return (255,0,190) | |
elif char == '9': | |
return (255,255,255) | |
def order_cmyk(order): | |
selection = order % 3 | |
if selection == 0: | |
return lambda motion : (int(motion),int(motion),0) | |
elif selection == 1: | |
return lambda motion : (int(motion),0,int(int(motion)*0.3)) | |
else: | |
return lambda motion : (0,int(motion),int(int(motion)*0.8)) | |
def sine_wave(amplitude, frequency, phase, offset): | |
return lambda t: amplitude*math.sin(1*math.pi*frequency*t+phase)+offset | |
def wheel(pos): | |
if pos < 0 or pos > 255: | |
r = g = b = 0 | |
elif pos < 85: | |
r = int(pos * 3) | |
g = int(255 - pos*3) | |
b = 0 | |
elif pos < 170: | |
pos -= 85 | |
r = int(255 - pos*3) | |
g = 0 | |
b = int(pos*3) | |
else: | |
pos -= 170 | |
r = 0 | |
g = int(pos*3) | |
b = int(255 - pos*3) | |
return (r, g, b) | |
def timer(function, interval_time, end_time, *argv, **kargs): | |
# assign polarity | |
if 'polarity' not in kargs: | |
polarity = 0 | |
else: | |
polarity = kargs['polarity'] | |
# polarity not flipped. | |
if not polarity: | |
# a start time is specified. | |
if 'start_time' in kargs: | |
if argv[0]/1000 % interval_time < end_time and argv[0]/1000 % interval_time > kargs['start_time']: | |
function(*argv) | |
#start at 0. | |
else: | |
if argv[0]/1000 % interval_time < end_time: | |
function(*argv) | |
# polarity is flipped. | |
else: | |
# a start time is specified. | |
if 'start_time' in kargs: | |
if argv[0]/1000 % interval_time > end_time and argv[0]/1000 % interval_time < kargs['start_time']: | |
function(*argv) | |
# start at 0. | |
else: | |
if argv[0]/1000 % interval_time > end_time: | |
function(*argv) | |
# Displays color encoded take over key. | |
def cots_show(current, order, strip, **kargs): | |
if 'take_over' in kargs: | |
take_over = kargs['take_over'] | |
counter = 0 | |
for char in take_over: | |
strip.set_pixel(counter, char2color(char)) | |
counter += 1 | |
strip.show() | |
def rgb_show_still(current, order, strip): | |
for eachPixel in range(10): | |
if eachPixel <= 2: | |
strip.set_pixel(eachPixel, (255,0,0)) | |
elif eachPixel <= 6: | |
strip.set_pixel(eachPixel, (0,255,0)) | |
else: | |
strip.set_pixel(eachPixel, (0,0,255)) | |
strip.show() | |
def acid_sweep_show(current, order, strip): | |
current = current/10000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 3.9, order, 50) | |
wave2 = sine_wave(100, 4, order, 100) | |
wave3 = sine_wave(100, 4.1, order, 100) | |
motion1 = int(wave1(current)) | |
motion2 = int(wave2(current)) | |
motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel,(motion3,motion1,motion2)) | |
strip.show() | |
def teal_white_show(current, order, strip): | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 4, eachPixel, 50) | |
wave2 = sine_wave(50, 4, eachPixel, 100) | |
wave3 = sine_wave(50, 4, eachPixel, 150) | |
current = time.ticks_ms()/1000 | |
motion1 = int(wave1(current)) | |
motion2 = int(wave2(current)) | |
motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel,(motion3,motion1,motion2)) | |
strip.show() | |
def weird_ping_show(current, order, strip): | |
current = current/40000 | |
motion = int(current%12) | |
if motion == order: | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel,(0,0,0)) | |
else: | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, wheel((current+order*10)%255)) | |
strip.show() | |
def nu_shimmer_show(current, order, strip): | |
for eachPixel in range(10): | |
wave1 = sine_wave(20, 15, eachPixel, 100) | |
wave2 = sine_wave(10, 26, eachPixel, 120) | |
wave3 = sine_wave(20, 37, eachPixel, 140) | |
current = time.ticks_ms()/10000 | |
motion1 = int((wave1(current)+wave2(current)-wave3(current))%255) | |
motion2 = int(wave2(current)/10) | |
motion3 = int(wave3(current)/10) | |
strip.set_pixel(eachPixel,(motion2,motion3,motion1)) | |
strip.show() | |
def nube_shimmer_show(current, order, strip): | |
for eachPixel in range(10): | |
wave1 = sine_wave(20, 10, eachPixel+order, 80) | |
wave2 = sine_wave(20, 25, eachPixel+(order*2), 120) | |
wave3 = sine_wave(20, 38, eachPixel, 140) | |
current = time.ticks_ms()/10000 | |
motion1 = int((wave1(current)+wave2(current)-wave3(current))%255) | |
motion2 = int(wave2(current)/10) | |
motion3 = int(wave3(current)/10) | |
strip.set_pixel(eachPixel,(motion2,motion3,motion1)) | |
strip.show() | |
def red_rift_show(current, order, strip): | |
current = current/40000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 9.99, order*20, 50) | |
wave2= sine_wave(50, 10, order*20, 120) | |
motion1 = int(wave1(current)) | |
motion2 = int(wave2(current)) | |
if eachPixel%2 == 0: | |
strip.set_pixel(eachPixel,(motion1,0,0)) | |
else: | |
strip.set_pixel(eachPixel,(motion2,0,0)) | |
strip.show() | |
def calm_show(current, order, strip): | |
current = current/100000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 9.99, order, 50) | |
wave2= sine_wave(50, 10, order, 120) | |
motion1 = int(wave1(current)) | |
motion2 = int(wave2(current)) | |
strip.set_pixel(eachPixel,(10,motion1,motion2)) | |
strip.show() | |
def calm_2_show(current, order, strip): | |
current = current/100000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 9.99, order, 50) | |
wave2= sine_wave(50, 10, order, 120) | |
motion1 = int(wave1(current)) | |
motion2 = int(wave2(current)) | |
strip.set_pixel(eachPixel,(motion1,motion2,motion1)) | |
strip.show() | |
def cmy_sweep_show(current, order, strip): | |
for eachPixel in range(10): | |
wave1 = sine_wave(100, 10, order, 100) | |
motion1 = int(wave1(current/1000)) | |
cmyk_motion = order_cmyk(order) | |
strip.set_pixel(eachPixel, cmyk_motion(motion1)) | |
strip.show() | |
def nu_show(current, order, strip): | |
current = current/50000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 9.99, order, 50) | |
wave2= sine_wave(50, 10, order, 50) | |
wave3= sine_wave(100, 10.01, order, 100) | |
motion1 = int(wave1(current)) | |
motion2 = int(wave2(current)) | |
motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (motion3,motion1,motion2)) | |
strip.show() | |
def rift_show(current, order, strip): | |
current = current/30000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 9.99, order*20, 50) | |
wave2= sine_wave(50, 10, order*20, 120) | |
motion1 = int(wave1(current)) | |
motion2 = int(wave2(current)) | |
strip.set_pixel(eachPixel, (motion1,motion2,0)) | |
strip.show() | |
def shrift_show(current, order, strip): | |
current = current/10000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 9.99, order*20, 50) | |
wave2= sine_wave(50, 10, order*20, 120) | |
motion1 = int(wave1(current)) | |
motion2 = int(wave2(current)) | |
strip.set_pixel(eachPixel, (0,motion2,motion1)) | |
strip.show() | |
def first_show(current, order, strip): | |
current = current/5000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 10, eachPixel, 50) | |
wave2= sine_wave(50, 8, eachPixel-1, 50) | |
wave3= sine_wave(100, 15, eachPixel+4, 100) | |
motion1 = int(wave1(current)) | |
motion2 = int(wave2(current)) | |
motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (motion3,motion1,motion2)) | |
strip.show() | |
def rccola_show(current, order, strip): | |
current = current/3000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 10, eachPixel, 50) | |
wave2= sine_wave(50, 8, eachPixel-2, 50) | |
wave3= sine_wave(100, 15, eachPixel+6, 100) | |
motion1 = int(wave1(current)) | |
motion2 = int(wave2(current)) | |
motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (motion3,0,motion2)) | |
strip.show() | |
def second_show(current, order, strip): | |
current = current/5000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 10, eachPixel, 50) | |
wave2= sine_wave(50, 8, eachPixel-1, 50) | |
wave3= sine_wave(100, 15, eachPixel+4, 100) | |
motion1 = int(wave1(current)) | |
motion2 = int(wave2(current)) | |
motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (motion1,0,motion1)) | |
strip.show() | |
def second_second_show(current, order, strip): | |
current = current/15000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 10, eachPixel, 50) | |
wave2= sine_wave(50, 8, eachPixel-1, 50) | |
wave3= sine_wave(100, 15, eachPixel+4, 100) | |
motion1 = int(wave1(current)) | |
motion2 = int(wave2(current)) | |
motion3 = int(wave3(-current)) | |
strip.set_pixel(eachPixel, (motion3,0,motion1)) | |
strip.show() | |
def third_show(current, order, strip): | |
current = current/50000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(10, 10, eachPixel, 50) | |
wave2= sine_wave(50, 80, eachPixel, 50) | |
wave3= sine_wave(20, 15, eachPixel, 50) | |
if eachPixel % 2 == 0: | |
motion1 = int(wave1(current)) | |
motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (1,motion1,motion3)) | |
else: | |
motion1 = int(wave2(current)) | |
strip.set_pixel(eachPixel, (motion1,10,1)) | |
strip.show() | |
def forth_show(current, order, strip): | |
current = current/50000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 10, eachPixel+order, 50) | |
wave2= sine_wave(50, 80, eachPixel+order, 50) | |
wave3= sine_wave(50, 15, eachPixel+order, 50) | |
if eachPixel % 2 == 0: | |
motion1 = int(wave1(current)) | |
motion2 = int(wave2(current)) | |
motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (motion2,10,motion3)) | |
else: | |
motion1 = int(wave2(current)) | |
strip.set_pixel(eachPixel, (motion1,0,4)) | |
strip.show() | |
def fifth_show(current, order, strip): | |
current = current/60000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 10, order, 50) | |
wave2= sine_wave(50, 80, order, 50) | |
wave3= sine_wave(50, 15, order, 50) | |
if eachPixel % 2 == 0: | |
motion1 = int(wave1(current)) | |
motion2 = int(wave2(current)) | |
motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (motion2,10,motion3)) | |
else: | |
motion1 = int(wave2(current)) | |
strip.set_pixel(eachPixel, (motion1,motion3,4)) | |
strip.show() | |
def water_show(current, order, strip): | |
current = current/20000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(10, 15, eachPixel, 10) | |
wave2 = sine_wave(20, 5, eachPixel+2, 50) | |
wave3 = sine_wave(50, 50, -eachPixel, 50) | |
motion1 = int(wave1(current)) | |
motion2 = int(wave2(current)) | |
motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (motion1,motion2,motion3)) | |
strip.show() | |
def peach_show(current, order, strip): | |
current = current/100000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(10, 15, eachPixel+(order*10), 10) | |
wave2 = sine_wave(20, 5, eachPixel+2+(order*10), 50) | |
wave3 = sine_wave(50, 50, -eachPixel+(order*1), 50) | |
motion1 = int(wave1(current)) | |
motion2 = int(wave2(current)) | |
motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (motion3,motion2,motion1)) | |
strip.show() | |
def beach_show(current, order, strip): | |
current = current/10000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(10, 15, eachPixel+(order*10), 10) | |
wave2 = sine_wave(20, 5, eachPixel+2+(order*10), 50) | |
wave3 = sine_wave(50, 50, -eachPixel+(order*1), 50) | |
motion1 = int(wave1(current)) | |
motion2 = int(wave2(current)) | |
motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (motion2,motion2,motion1)) | |
strip.show() | |
def room_shimmer_show(current, order, strip): | |
current = current/20000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(20, 15, order, 100) | |
wave2 = sine_wave(20, 26, order, 60) | |
wave3 = sine_wave(20, 37, order, 140) | |
motion1 = int((wave1(current)+wave2(current)-wave3(current))%255) | |
strip.set_pixel(eachPixel, (motion1,0,0)) | |
strip.show() | |
def bloom_shimmer_show(current, order, strip): | |
current = current/40000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(20, 15, order, 100) | |
wave2 = sine_wave(10, 26, order, 120) | |
wave3 = sine_wave(20, 37, order, 140) | |
motion1 = int((wave1(current)+wave2(current)-wave3(current))%255) | |
motion2 = int(wave2(current)) | |
#motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (motion1,0,motion2)) | |
strip.show() | |
def red_shimmer_show(current, order, strip): | |
current = current/20000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(20, 15, eachPixel, 100) | |
wave2 = sine_wave(10, 26, eachPixel, 120) | |
wave3 = sine_wave(20, 37, eachPixel, 140) | |
motion1 = int((wave1(current)+wave2(current)-wave3(current))%255) | |
#motion2 = int(wave2(current)) | |
#motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (motion1,0,0)) | |
strip.show() | |
def purple_shimmer_show(current, order, strip): | |
current = current/20000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(20, 15, eachPixel, 100) | |
wave2 = sine_wave(10, 26, eachPixel, 120) | |
wave3 = sine_wave(20, 37, eachPixel, 140) | |
motion1 = int((wave1(current)+wave2(current)-wave3(current))%255) | |
#motion2 = int(wave2(current)) | |
#motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (motion1,0,motion1)) | |
strip.show() | |
def green_shimmer_show(current, order, strip): | |
current = current/20000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(20, 15, eachPixel, 100) | |
wave2 = sine_wave(10, 26, eachPixel, 120) | |
wave3 = sine_wave(20, 37, eachPixel, 140) | |
motion1 = int((wave1(current)+wave2(current)-wave3(current))%255) | |
#motion2 = int(wave2(current)) | |
#motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (0,motion1,motion1)) | |
strip.show() | |
def ns_show(current, order, strip): | |
current = current/20000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(20, 37, eachPixel, 140) | |
motion1 = int(wave1(current)/10) | |
motion2 = int(wave1(current)/20) | |
strip.set_pixel(eachPixel, (0,motion2,motion1)) | |
strip.show() | |
def nsa_show(current, order, strip): | |
current = current/21000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(20, 17, eachPixel, 140) | |
motion1 = int(wave1(current)/10) | |
motion2 = int(wave1(current)/20) | |
strip.set_pixel(eachPixel, (motion2,20,motion1)) | |
strip.show() | |
def new_shimmer_show(current, order, strip): | |
current = current/20000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(20, 11, eachPixel, 100) | |
wave2 = sine_wave(13, 26, eachPixel, 120) | |
wave3 = sine_wave(30, 47, eachPixel, 130) | |
motion1 = int((wave1(current)+wave2(current)-wave3(current))%255) | |
#motion2 = int(wave2(current)) | |
#motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (int(motion1/2),motion1,int(motion1/4))) | |
strip.show() | |
def blue_shimmer_show(current, order, strip): | |
current = current/20000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 15, eachPixel, 50) | |
wave2 = sine_wave(20, 50, eachPixel, 20) | |
# wave3 = sine_wave(20, 37, eachPixel, 140) | |
motion1 = int(wave1(current)) | |
motion2 = int(wave2(current)) | |
#motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (0,motion2,motion1)) | |
strip.show() | |
def ocean_show(current, order, strip): | |
current = current/10000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 15, 0, 50) | |
wave2 = sine_wave(50, 4, 0, 50) | |
# wave3 = sine_wave(20, 37, eachPixel, 140) | |
motion1 = int(wave1(current)) | |
motion2 = int(wave2(current)) | |
# motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (0,motion2,motion1)) | |
strip.show() | |
def cmy_show(current, order, strip): | |
current = current/50000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 15, eachPixel, 50) | |
wave2 = sine_wave(50, 15, eachPixel+1, 50) | |
wave3 = sine_wave(50, 15, eachPixel+4, 50) | |
motion1 = int(wave1(current)) | |
motion2 = int(wave2(current)) | |
motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (motion1,motion2,motion3)) | |
strip.show() | |
def pink_white_show(current, order, strip): | |
current = current/5000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 4, eachPixel, 50) | |
wave2 = sine_wave(50, 4, eachPixel, 100) | |
wave3 = sine_wave(50, 4, eachPixel, 150) | |
motion1 = int(wave1(current)) | |
motion2 = int(wave2(current)) | |
motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (motion3,motion1,motion2)) | |
strip.show() | |
def some_white_show(current, order, strip): | |
current = current/5000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 4, eachPixel, 50) | |
wave2 = sine_wave(50, 4, eachPixel, 100) | |
wave3 = sine_wave(50, 4, eachPixel, 150) | |
motion1 = int(wave1(current)) | |
motion2 = int(wave2(current)) | |
motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (motion2,motion1,motion3)) | |
strip.show() | |
def some_shit_show(current, order, strip): | |
current = current/5000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 4, eachPixel, 50) | |
wave2 = sine_wave(50, 4, eachPixel, 100) | |
wave3 = sine_wave(50, 4, eachPixel, 150) | |
motion1 = int(wave1(current)) | |
motion2 = int(wave2(current)) | |
motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (motion3,motion2,motion1)) | |
strip.show() | |
def blue_off_show(current, order, strip): | |
current = current/50000 | |
for eachPixel in range(10): | |
wave3 = sine_wave(50, 15, eachPixel, 50) | |
motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (0,0,motion3)) | |
strip.show() | |
def blue_flash_show(current, order, strip): | |
current = current/3000 | |
for eachPixel in range(10): | |
wave3 = sine_wave(50, 15, 0, 50) | |
motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (0,0,motion3)) | |
strip.show() | |
def green_flash_show(current, order, strip): | |
current = current/3000 | |
for eachPixel in range(10): | |
wave3 = sine_wave(50, 15, 0, 50) | |
motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (int(motion3/4),motion3,0)) | |
strip.show() | |
def red_flash_show(current, order, strip): | |
current = current/3000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 15, 0, 50) | |
motion1 = int(wave1(current)) | |
strip.set_pixel(eachPixel, (motion1,0,0)) | |
strip.show() | |
def blue_fast_show(current, order, strip): | |
current = current/2000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 15, 0, 50) | |
motion1 = int(wave1(current)) | |
strip.set_pixel(eachPixel, (0,0,motion1)) | |
strip.show() | |
def spaz_show(current, order, strip): | |
for eachPixel in range(10): | |
motion = (current+order)/3 | |
color = wheel(motion%150) | |
strip.set_pixel(eachPixel, color) | |
strip.show() | |
def spaz_less_show(current, order, strip): | |
for eachPixel in range(10): | |
motion = (current+order) | |
color = wheel(motion%255) | |
strip.set_pixel(eachPixel, color) | |
strip.show() | |
def spaz_2_show(current, order, strip): | |
current = current/40 | |
for eachPixel in range(10): | |
wave1 = sine_wave(500, 10, eachPixel, 50) | |
wave2= sine_wave(100, 80, eachPixel-1, 50) | |
wave3= sine_wave(100, 15, eachPixel+4, 100) | |
motion1 = int(wave1(current))%255 | |
motion2 = int(wave2(current))%255 | |
motion3 = int(wave3(current))%255 | |
strip.set_pixel(eachPixel, (motion3,motion1,motion2)) | |
strip.show() | |
def rainbow_twinkle_show(current, order, strip): | |
current = current/200000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(500, 10, eachPixel, 50) | |
wave2= sine_wave(100, 80, eachPixel-1, 50) | |
wave3= sine_wave(100, 15, eachPixel+4, 100) | |
motion1 = int(wave1(current))%255 | |
motion2 = int(wave2(current))%255 | |
motion3 = int(wave3(current))%255 | |
strip.set_pixel(eachPixel, (motion3,motion1,motion2)) | |
strip.show() | |
def aqua_twinkle_show(current, order, strip): | |
current = current/1000000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 20, eachPixel, 50) | |
wave2= sine_wave(60, 8, eachPixel-11, 50) | |
wave3= sine_wave(120, 135, eachPixel+14, 100) | |
motion1 = int(wave1(current))%30 | |
motion2 = int(wave2(current))%100 | |
motion3 = int(wave3(current))%255 | |
strip.set_pixel(eachPixel, (motion1,motion2,motion3)) | |
strip.show() | |
def pink_twinkle_show(current, order, strip): | |
current = current/1000000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 20, eachPixel, 50) | |
wave2= sine_wave(606, 82, eachPixel+1, 50) | |
wave3= sine_wave(120, 135, eachPixel-14, 100) | |
motion1 = int(wave1(current))%30 | |
motion2 = int(wave2(current))%100 | |
motion3 = int(wave3(current))%255 | |
strip.set_pixel(eachPixel, (motion3,motion2,motion1)) | |
strip.show() | |
def shwinkle_show(current, order, strip): | |
current = current/500000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 20, order, 50) | |
wave2= sine_wave(606, 41, order, 50) | |
wave3= sine_wave(120, 50, order, 100) | |
motion1 = int(wave1(current))%150 | |
motion2 = int(wave2(current))%200 | |
motion3 = int(wave3(current))%255 | |
strip.set_pixel(eachPixel, (motion3,motion2,motion1)) | |
strip.show() | |
def winkle_show(current, order, strip): | |
current = current/300000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 20, order, 50) | |
wave2= sine_wave(606, 41, order, 50) | |
wave3= sine_wave(120, 50, order, 100) | |
motion1 = int(wave1(current))%150 | |
motion2 = int(wave2(current))%100 | |
motion3 = int(wave3(current))%205 | |
strip.set_pixel(eachPixel, (motion2,motion3,motion1)) | |
strip.show() | |
def finkle_show(current, order, strip): | |
current = current/300000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(50, 20, order, 50) | |
wave2= sine_wave(606, 41, order, 50) | |
motion1 = int(wave1(current))%150 | |
motion2 = int(wave2(current))%100 | |
strip.set_pixel(eachPixel, (motion2,0,motion1)) | |
strip.show() | |
def tinkle_show(current, order, strip): | |
current = current/1000000 | |
for eachPixel in range(10): | |
wave2= sine_wave(606, 41, order, 50) | |
motion2 = int(wave2(current))%100 | |
strip.set_pixel(eachPixel, (0,motion2,0)) | |
strip.show() | |
def red_pulse_show(current, order, strip): | |
for eachPixel in range(10): | |
motion = current/100 | |
strip.set_pixel(eachPixel, (int(-motion%200)+55,20,0)) | |
strip.show() | |
def ocean_pulse_show(current, order, strip): | |
for eachPixel in range(10): | |
motion = current/60 | |
color = wheel(motion%255) | |
strip.set_pixel(eachPixel, (0,20,int(-motion%200)+55)) | |
strip.show() | |
def white_pulse_show(current, order, strip): | |
for eachPixel in range(10): | |
wave1 = sine_wave(100, 20, 0, 150) | |
motion1 = int(wave1(current/2000/20)) | |
strip.set_pixel(eachPixel, (motion1,motion1,motion1)) | |
strip.show() | |
def shpulse_show(current, order, strip): | |
for eachPixel in range(10): | |
wave1 = sine_wave(100, 20, 0, 150) | |
motion1 = int(wave1(current/10000)) | |
strip.set_pixel(eachPixel, (50,100,motion1)) | |
strip.show() | |
def red_step_show(current, order, strip): | |
for eachPixel in range(10): | |
clock = int(current/800%10) | |
if eachPixel == clock: | |
strip.set_pixel(eachPixel, (255,0,0)) | |
else: | |
strip.set_pixel(eachPixel, (25,25,25)) | |
strip.show() | |
def red_fast_step_show(current, order, strip): | |
current = current/100 | |
for eachPixel in range(10): | |
clock = int(current%10) | |
if eachPixel == clock: | |
strip.set_pixel(eachPixel, (255,0,0)) | |
else: | |
strip.set_pixel(eachPixel, (0,0,55)) | |
strip.show() | |
def green_fast_step_show(current, order, strip): | |
current = current/100 | |
for eachPixel in range(10): | |
clock = int(current%10) | |
if eachPixel == clock: | |
strip.set_pixel(eachPixel, (0,0,255)) | |
else: | |
strip.set_pixel(eachPixel, (0,55,0)) | |
strip.show() | |
def grad_fast_step_show(current, order, strip): | |
current = current/100 | |
for eachPixel in range(10): | |
clock = int(current%10) | |
if eachPixel == clock: | |
strip.set_pixel(eachPixel, (0,clock*10,255)) | |
else: | |
strip.set_pixel(eachPixel, (0,55,0)) | |
strip.show() | |
def picky_show(current, order, strip): | |
selection = order % 3 | |
if selection == 0: | |
red_shimmer_show(current,order,strip) | |
elif selection ==1: | |
green_shimmer_show(current,order,strip) | |
else: | |
purple_shimmer_show(current,order,strip) | |
def red_ping_show(current, order, strip): | |
motion = int(current/400%12) | |
if motion == order: | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, (255,0,0)) | |
else: | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, (25,25,25)) | |
strip.show() | |
def yo_ping_show(current, order, strip): | |
motion = int(-current/600%12) | |
if motion == order: | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, char2color(str(random.randint(0,9)))) | |
else: | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, (150,150,150)) | |
strip.show() | |
def yoyo_ping_show(current, order, strip): | |
motion = int(current/1000%12) | |
if motion == order: | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, char2color(str(random.randint(0,9)))) | |
strip.show() | |
def lime_ping_show(current, order, strip): | |
motion = int(current/100%12) | |
if motion == order: | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, (166,255,0)) | |
else: | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, (66,102,0)) | |
strip.show() | |
def crime_ping_show(current, order, strip): | |
motion = int(current/100%12) | |
mini_wheel = int(current/100%255) | |
if motion == order: | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, (166,0,mini_wheel)) | |
else: | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, (mini_wheel,mini_wheel,mini_wheel)) | |
strip.show() | |
def king_ping_show(current, order, strip): | |
motion = int(current/1000%12) | |
if motion == order: | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, (0,100,100)) | |
else: | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, (100,100,0)) | |
strip.show() | |
def weird_ping_show(current, order, strip): | |
motion = int(current/10%12) | |
if motion == order: | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, (0,0,0)) | |
else: | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, wheel((current+order*10)%255)) | |
strip.show() | |
def rainbow_sweep_show(current, order, strip): | |
for eachPixel in range(10): | |
motion = (current/1000+order)*20 | |
color = wheel(motion%255) | |
strip.set_pixel(eachPixel, color) | |
strip.show() | |
def cmy_sweep_show(current, order, strip): | |
for eachPixel in range(10): | |
wave1 = sine_wave(100, 10, order, 100) | |
motion1 = int(wave1(current/40000)) | |
cmyk_motion = order_cmyk(order) | |
strip.set_pixel(eachPixel, cmyk_motion(motion1)) | |
strip.show() | |
def creep_sweep_show(current, order, strip): | |
current = -current/10000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(100, 3.8, order, 100) | |
wave2 = sine_wave(5, 4, order, 10) | |
wave3 = sine_wave(30, 4.2, order, 40) | |
motion1 = int(wave1(current)) | |
motion2 = int(wave2(current)) | |
motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (motion3,motion1,motion2)) | |
strip.show() | |
def shweep_show(current, order, strip): | |
current = -current/10000 | |
for eachPixel in range(10): | |
wave1 = sine_wave(40, 0, order, 40) | |
wave2 = sine_wave(50, 4, order, 60) | |
wave3 = sine_wave(10, 8, order, 20) | |
motion1 = int(wave1(current/2)) | |
motion2 = int(wave2(-current)) | |
motion3 = int(wave3(current)) | |
strip.set_pixel(eachPixel, (motion1,motion3,motion2)) | |
strip.show() | |
# COMBO SHOWS | |
def teal_pink_show(current,order,strip): | |
if order % 2 == 0: | |
teal_white_show(current,order,strip) | |
else: | |
pink_white_show(current,order,strip) | |
def real_peel_show(current,order,strip): | |
if order % 2 == 0: | |
tinkle_show(current,order,strip) | |
else: | |
winkle_show(current,order,strip) | |
def all_sweep_show(current,order,strip): | |
if order % 4 == 0: | |
creep_sweep_show(current,order,strip) | |
elif order % 4 == 1: | |
shweep_show(current,order,strip) | |
elif order % 4 == 2: | |
rainbow_sweep_show(current,order,strip) | |
else: | |
acid_sweep_show(current,order,strip) | |
def rifty_show(current,order,strip): | |
if order % 3 == 0: | |
rift_show(current,order,strip) | |
elif order % 3 == 1: | |
shweep_show(current,order,strip) | |
else: | |
shrift_show(current,order,strip) | |
def nu_combo_show(current,order,strip): | |
if order % 2 == 0: | |
ns_show(current,order,strip) | |
else: | |
aqua_twinkle_show(current,order,strip) | |
def calming_show(current,order,strip): | |
if order % 3 == 0: | |
calm_show(current,order,strip) | |
elif order % 3 == 1: | |
calm_2_show(current,order,strip) | |
else: | |
ocean_show(current,order,strip) | |
def shit_show(current,order,strip): | |
if order % 2 == 0: | |
beach_show(current,order,strip) | |
else: | |
ns_show(current,order,strip) | |
# SOLID COLORS | |
# def blank_show(currnet, order, strip): | |
# for eachPixel in range(10): | |
# strip.set_pixel(eachPixel, (0,0,0)) | |
# strip.show() | |
def solid_red(current, order, strip): | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, (255,0,0)) | |
strip.show() | |
def solid_orange(current, order, strip): | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, (255,40,0)) | |
strip.show() | |
def solid_yellow(current, order, strip): | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, (255,235,0)) | |
strip.show() | |
def solid_green(current, order, strip): | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, (0,255,0)) | |
strip.show() | |
def solid_light_blue(current, order, strip): | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, (0,255,255)) | |
strip.show() | |
def solid_dark_blue(current, order, strip): | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, (0,0,255)) | |
strip.show() | |
def solid_purple(current, order, strip): | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, (145,0,255)) | |
strip.show() | |
def solid_pink(current, order, strip): | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, (255,0,200)) | |
strip.show() | |
def solid_white(current, order, strip): | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, (255,255,255)) | |
strip.show() | |
# TIMER SHOWS | |
def matrix_marquee_show(current, order, strip): | |
if order % 2 == 0: | |
timer(bloom_shimmer_show, 2, 2, current, order, strip) | |
timer(creep_sweep_show, 2, 4, current, order, strip, start_time=2) | |
else: | |
timer(creep_sweep_show, 2, 2, current, order, strip) | |
timer(bloom_shimmer_show, 2, 4, current, order, strip, start_time=2) | |
def matrix_hot_marquee_show(current, order, strip): | |
if order % 2 == 0: | |
timer(rainbow_twinkle_show, 4, 2, current, order, strip) | |
timer(cmy_sweep_show, 4, 4, current, order, strip, start_time=2) | |
else: | |
timer(cmy_sweep_show, 4, 2, current, order, strip) | |
timer(rainbow_twinkle_show, 4, 4, current, order, strip, start_time=2) | |
def fire_marquee_show(current, order, strip): | |
if order % 2 == 0: | |
timer(some_shit_show, 4, 2, current, order, strip) | |
timer(aqua_twinkle_show, 4, 4, current, order, strip, start_time=2) | |
else: | |
timer(aqua_twinkle_show, 4, 2, current, order, strip) | |
timer(some_shit_show, 4, 4, current, order, strip, start_time=2) | |
def milk_marquee_show(current, order, strip): | |
if order % 2 == 0: | |
timer(beach_show, 4, 2, current, order, strip) | |
timer(teal_white_show, 4, 4, current, order, strip, start_time=2) | |
else: | |
timer(pink_white_show, 4, 2, current, order, strip) | |
timer(beach_show, 4, 4, current, order, strip, start_time=2) | |
def step_marquee_show(current, order, strip): | |
if order % 2 == 0: | |
timer(red_fast_step_show, 4, 2, current, order, strip) | |
timer(green_fast_step_show, 4, 4, current, order, strip, start_time=2) | |
else: | |
timer(green_fast_step_show, 4, 2, current, order, strip) | |
timer(red_fast_step_show, 4, 4, current, order, strip, start_time=2) | |
def cherry_marquee_show(current, order, strip): | |
if order % 2 == 0: | |
timer(solid_light_blue, 4, 2, current, order, strip) | |
timer(solid_pink, 4, 4, current, order, strip, start_time=2) | |
else: | |
timer(solid_orange, 4, 2, current, order, strip) | |
timer(solid_dark_blue, 4, 4, current, order, strip, start_time=2) | |
def op_marquee_show(current, order, strip): | |
if order % 2 == 0: | |
timer(solid_pink, 2, 1, current, order, strip) | |
timer(solid_orange, 2, 2, current, order, strip, start_time=1) | |
else: | |
timer(solid_orange, 2, 1, current, order, strip) | |
timer(solid_pink, 2, 2, current, order, strip, start_time=1) | |
def marquee_show(current, order, strip): | |
if order % 2 == 0: | |
timer(solid_white, 4, 2, current, order, strip) | |
timer(solid_red, 4, 4, current, order, strip, start_time=2) | |
else: | |
timer(solid_red, 4, 2, current, order, strip) | |
timer(solid_white, 4, 4, current, order, strip, start_time=2) | |
def odd_marquee_show(current, order, strip): | |
if order % 2 == 0: | |
timer(solid_green, 4, 2, current, order, strip) | |
timer(solid_light_blue, 4, 4, current, order, strip, start_time=2) | |
else: | |
timer(solid_yellow, 4, 2, current, order, strip) | |
timer(solid_pink, 4, 4, current, order, strip, start_time=2) | |
def glitch_show(current, order, strip): | |
timer(spaz_show, 15, 2, current, order, strip) | |
timer(spaz_2_show, 15, 3, current, order, strip, start_time=2) | |
timer(red_fast_step_show, 15, 15, current, order, strip, start_time=3) | |
def siren_show(current, order, strip): | |
timer(blue_flash_show, 3, 2, current, order, strip) | |
timer(red_flash_show, 3, 3, current, order, strip, start_time=2) | |
def g_siren_show(current, order, strip): | |
timer(green_flash_show, 3, 2, current, order, strip) | |
timer(red_flash_show, 3, 3, current, order, strip, start_time=2) | |
def five_oh_show(current,order, strip): | |
timer(siren_show, 6, 5, current, order, strip) | |
timer(blue_fast_show, 6, 6, current, order, strip, start_time=5) | |
# SELECT SHOWS | |
# def select_dim_show(current,order,strip): | |
# for eachPixel in range(10): | |
# if random.randint(0,1) == 1: | |
# strip[eachPixel]=(100,25,25) | |
def select_white_show(current,order,strip): | |
for eachPixel in range(10): | |
if random.randint(0,1) == 1: | |
strip.set_pixel(eachPixel, (200,200,200)) | |
def select_orange_show(current,order,strip): | |
for eachPixel in range(10): | |
if random.randint(0,1) == 1: | |
strip.set_pixel(eachPixel, (255,40,0)) | |
def select_pink_show(current,order,strip): | |
for eachPixel in range(10): | |
if random.randint(0,1) == 1: | |
strip.set_pixel(eachPixel, (255,0,60)) | |
def select_teal_show(current,order,strip): | |
for eachPixel in range(10): | |
if random.randint(0,1) == 1: | |
strip.set_pixel(eachPixel, (0,255,60)) | |
def select_purple_show(current,order,strip): | |
for eachPixel in range(10): | |
if random.randint(0,1) == 1: | |
strip.set_pixel(eachPixel, (255,0,255)) | |
def select_blue_show(current,order,strip): | |
for eachPixel in range(10): | |
if random.randint(0,1) == 1: | |
strip.set_pixel(eachPixel, (0,0,255)) | |
def select_matrix_show(current,order,strip): | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, (0,0,0)) | |
if random.randint(0,1) == 1: | |
strip.set_pixel(eachPixel, (20,255,0)) | |
def select_red_show(current,order,strip): | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, (10,10,10)) | |
if random.randint(0,1) == 1: | |
strip.set_pixel(eachPixel, (255,0,0)) | |
def select_noclear_spec_show(current,order,strip): | |
for eachPixel in range(10): | |
if random.randint(0,1) == 1: | |
strip.set_pixel(eachPixel, (random.randint(0,254),random.randint(0,254),random.randint(0,254))) | |
def select_full_spec_show(current,order,strip): | |
light_on_count = 0 | |
while light_on_count < 3: | |
light_on_count = 0 | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, (0,0,0)) | |
if random.randint(0,1) == 1: | |
light_on_count += 1 | |
strip.set_pixel(eachPixel, (random.randint(0,254),random.randint(0,254),random.randint(0,254))) | |
def select_spec_show(current,order,strip): | |
color=(random.randint(0,254),random.randint(0,254),random.randint(0,254)) | |
light_on_count = 0 | |
while light_on_count < 3: | |
light_on_count = 0 | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, (0,0,0)) | |
if random.randint(0,1) == 1: | |
light_on_count += 1 | |
strip.set_pixel(eachPixel,color) | |
def random_fill(strip): | |
sum_color = 0 | |
while sum_color < 150: | |
color=(random.randint(0,254),random.randint(0,254),random.randint(0,254)) | |
sum_color = sum(color) | |
for eachPixel in range(10): | |
strip.set_pixel(eachPixel, color) | |
def select_1(current,order,strip): | |
if order == 1: | |
random_fill(strip) | |
def select_2(current,order,strip): | |
if order == 2: | |
random_fill(strip) | |
def select_3(current,order,strip): | |
if order == 3: | |
random_fill(strip) | |
def select_4(current,order,strip): | |
if order == 4: | |
random_fill(strip) | |
def select_5(current,order,strip): | |
if order == 5: | |
random_fill(strip) | |
def select_6(current,order,strip): | |
if order == 6: | |
random_fill(strip) | |
def select_7(current,order,strip): | |
if order == 7: | |
random_fill(strip) | |
def select_8(current,order,strip): | |
if order == 8: | |
random_fill(strip) | |
def select_9(current,order,strip): | |
if order == 9: | |
random_fill(strip) | |
def select_10(current,order,strip): | |
if order == 10: | |
random_fill(strip) | |
def select_11(current,order,strip): | |
if order == 11: | |
random_fill(strip) | |
def select_12(current,order,strip): | |
if order == 12: | |
random_fill(strip) | |
def select_random_all(current, order, strip): | |
select_1(current,order,strip) | |
select_2(current,order,strip) | |
select_3(current,order,strip) | |
select_4(current,order,strip) | |
select_5(current,order,strip) | |
select_6(current,order,strip) | |
select_7(current,order,strip) | |
select_8(current,order,strip) | |
select_9(current,order,strip) | |
select_10(current,order,strip) | |
select_11(current,order,strip) | |
select_12(current,order,strip) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tower_list = [ | |
{ | |
"number": 1, | |
"name": "Tower 1", | |
"shows": [ | |
"nu_shimmer_show", | |
"weird_ping_show", | |
"calm_show", | |
"calm_2_show", | |
"red_rift_show", | |
"cmy_sweep_show", | |
"teal_white_show", | |
"acid_sweep_show", | |
"nu_show", | |
"rift_show", | |
"shrift_show", | |
"first_show" | |
] | |
}, | |
{ | |
"number": 2, | |
"name": "Tower 2", | |
"shows": [ | |
"second_show", | |
"second_second_show", | |
"third_show", | |
"forth_show", | |
"weird_ping_show", | |
"water_show", | |
"peach_show", | |
"beach_show", | |
"room_shimmer_show", | |
"bloom_shimmer_show", | |
"red_shimmer_show", | |
"purple_shimmer_show" | |
] | |
}, | |
{ | |
"number": 3, | |
"name": "Tower 3", | |
"shows": [ | |
"green_shimmer_show", | |
"ns_show", | |
"new_shimmer_show", | |
"blue_shimmer_show", | |
"ocean_show", | |
"cmy_show", | |
"pink_white_show", | |
"some_white_show", | |
"some_shit_show", | |
"blue_off_show", | |
"blue_flash_show", | |
"red_flash_show" | |
] | |
}, | |
{ | |
"number": 4, | |
"name": "Tower 4", | |
"shows": [ | |
"lime_ping_show", | |
"spaz_show", | |
"spaz_less_show", | |
"spaz_2_show", | |
"marquee_show", | |
"aqua_twinkle_show", | |
"pink_twinkle_show", | |
"cherry_marquee_show", | |
"winkle_show", | |
"finkle_show", | |
"tinkle_show", | |
"creep_sweep_show" | |
] | |
}, | |
{ | |
"number": 5, | |
"name": "Tower 5", | |
"shows": [ | |
"ocean_pulse_show", | |
"rifty_show", | |
"shpulse_show", | |
"red_step_show", | |
"red_fast_step_show", | |
"green_fast_step_show", | |
"picky_show", | |
"red_ping_show", | |
"blue_fast_show", | |
"fifth_show", | |
"cmy_sweep_show", | |
"red_pulse_show" | |
] | |
}, | |
{ | |
"number": 6, | |
"name": "Tower 6", | |
"shows": [ | |
"king_ping_show", | |
"rainbow_sweep_show", | |
"shweep_show", | |
"teal_pink_show", | |
"white_pulse_show", | |
"calming_show", | |
"milk_marquee_show", | |
"rainbow_twinkle_show", | |
"all_sweep_show", | |
"shit_show", | |
"shwinkle_show", | |
"op_marquee_show" | |
] | |
}, | |
{ | |
"number": 7, | |
"name": "Tower 7", | |
"shows": [ | |
"yo_ping_show", | |
"step_marquee_show", | |
"cmy_show", | |
"fire_marquee_show", | |
"yoyo_ping_show", | |
"cmy_sweep_show", | |
"third_show", | |
"nu_combo_show", | |
"some_white_show", | |
"cherry_marquee_show", | |
"bloom_shimmer_show", | |
"red_ping_show" | |
] | |
}, | |
{ | |
"number": 8, | |
"name": "Tower 8", | |
"shows": [ | |
"solid_red", | |
"solid_orange", | |
"solid_yellow", | |
"solid_green", | |
"solid_light_blue", | |
"solid_dark_blue", | |
"solid_purple", | |
"solid_pink", | |
"solid_white", | |
"select_noclear_spec_show", | |
"select_random_all", | |
"op_marquee_show" | |
] | |
}, | |
{ | |
"number": 9, | |
"name": "Tower 9", | |
"shows": [ | |
"matrix_marquee_show", | |
"matrix_hot_marquee_show", | |
"rccola_show", | |
"rainbow_twinkle_show", | |
"rifty_show", | |
"red_step_show", | |
"acid_sweep_show", | |
"odd_marquee_show", | |
"some_shit_show", | |
"first_show", | |
"glitch_show", | |
"siren_show" | |
] | |
}, | |
{ | |
"number": 10, | |
"name": "Tower 10", | |
"shows": [ | |
"rccola_show", | |
"shpulse_show", | |
"acid_sweep_show", | |
"yoyo_ping_show", | |
"weird_ping_show", | |
"red_ping_show", | |
"spaz_less_show", | |
"some_white_show", | |
"green_fast_step_show", | |
"king_ping_show", | |
"step_marquee_show", | |
"rainbow_sweep_show" | |
] | |
}, | |
{ | |
"number": 11, | |
"name": "Tower 11", | |
"shows": [ | |
"winkle_show", | |
"nsa_show", | |
"green_flash_show", | |
"grad_fast_step_show", | |
"cherry_marquee_show", | |
"creep_sweep_show", | |
"red_step_show", | |
"fifth_show", | |
"spaz_2_show", | |
"nu_shimmer_show", | |
"room_shimmer_show", | |
"all_sweep_show" | |
] | |
}, | |
{ | |
"number": 12, | |
"name": "Tower 12", | |
"shows": [ | |
"bloom_shimmer_show", | |
"real_peel_show", | |
"second_second_show", | |
"crime_ping_show", | |
"finkle_show", | |
"beach_show", | |
"white_pulse_show", | |
"lime_ping_show", | |
"shweep_show", | |
"teal_pink_show", | |
"nube_shimmer_show", | |
"five_oh_show" | |
] | |
}, | |
{ | |
"number": 13, | |
"name": "Select Mode 1", | |
"shows": [ | |
"select_1", | |
"select_2", | |
"select_3", | |
"select_4", | |
"select_5", | |
"select_6", | |
"select_7", | |
"select_8", | |
"select_9", | |
"select_10", | |
"select_11", | |
"select_12" | |
] | |
}, | |
{ | |
"number": 14, | |
"name": "Select Mode 2", | |
"shows": [ | |
"select_white_show", | |
"select_pink_show", | |
"select_orange_show", | |
"select_teal_show", | |
"select_purple_show", | |
"select_blue_show", | |
"select_matrix_show", | |
"select_red_show", | |
"select_noclear_spec_show", | |
"select_full_spec_show", | |
"select_spec_show", | |
"select_random_all" | |
] | |
} | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import framebuf | |
def power_on_leds(strip, brightness): | |
strip.brightness(brightness) | |
strip.set_pixel(0,(255,50,0)) | |
strip.set_pixel(1,(255,50,0)) | |
strip.set_pixel(2,(255,50,0)) | |
strip.set_pixel(3,(255,50,0)) | |
strip.set_pixel(4,(255,50,0)) | |
strip.set_pixel(5,(255,50,0)) | |
strip.set_pixel(6,(255,50,0)) | |
strip.set_pixel(7,(255,50,0)) | |
strip.set_pixel(8,(255,50,0)) | |
strip.set_pixel(9,(255,50,0)) | |
strip.show() | |
# simple scrn function | |
def scrn(oled, message): | |
oled.fill(0) | |
oled.text(message, 0, 16) | |
oled.show() | |
def admin_login(press_log, oled): | |
admin_pass = "220616" | |
if admin_pass == ''.join(press_log[-len(admin_pass):]): | |
scrn(oled,"mode change...") | |
return True | |
else: | |
return False | |
def admin_login_final(press_log, oled): | |
admin_pass = "69515" | |
if admin_pass == ''.join(press_log[-len(admin_pass):]): | |
scrn(oled,"admin mode") | |
return True | |
else: | |
return False | |
def select_mode_1(press_log, oled): | |
admin_pass = "2600" | |
if admin_pass == ''.join(press_log[-len(admin_pass):]): | |
scrn(oled,"A secret mode!") | |
return True | |
else: | |
return False | |
def select_mode_2(press_log, oled): | |
admin_pass = "5558632" | |
if admin_pass == ''.join(press_log[-len(admin_pass):]): | |
scrn(oled,"Protovision...") | |
return True | |
else: | |
return False | |
def display_graphic(byte_array, oled, clear=True, x_offset=0, y_offest=0, width=128): | |
fb = framebuf.FrameBuffer(byte_array, width, 32, framebuf.MONO_HLSB) | |
if clear: | |
oled.fill(0) | |
oled.blit(fb,x_offset,y_offest) | |
oled.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment