├── Micro Python ├── Oh No.wav ├── free-sound-1674745346.wav ├── config.json ├── WIFI_CONFIG.py ├── pimoroni-stellar_unicorn-v1.20.4-micropython.uf2.url ├── micro_python.txt ├── urequests.py ├── network_manager.py ├── micropython_youtube_api.py ├── FreeMono9pt7b.py └── main_yt.py ├── README.md ├── .github └── FUNDING.yml └── HUB75_RP2840.kicad_pro /Micro Python/Oh No.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mortens-lab/HUB75-PICO-shield/HEAD/Micro Python/Oh No.wav -------------------------------------------------------------------------------- /Micro Python/free-sound-1674745346.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mortens-lab/HUB75-PICO-shield/HEAD/Micro Python/free-sound-1674745346.wav -------------------------------------------------------------------------------- /Micro Python/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "appkeyid": "insert your own", 3 | "channelid": "insert your own", 4 | "query_interval_sec": 60 5 | } 6 | 7 | -------------------------------------------------------------------------------- /Micro Python/WIFI_CONFIG.py: -------------------------------------------------------------------------------- 1 | SSID = "insert your own" 2 | PSK = "insert your own" 3 | COUNTRY = "insert your own" # Change to your local two-letter ISO 3166-1 country code -------------------------------------------------------------------------------- /Micro Python/pimoroni-stellar_unicorn-v1.20.4-micropython.uf2.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=https://github.com/pimoroni/pimoroni-pico/releases/download/v1.20.4/pimoroni-stellar_unicorn-v1.20.4-micropython.uf2 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/mortenslab) 2 | # HUB75-PICO-shield 3 | HUB75 matrix display shield controlled by a Raspberry Pi Pico W 4 | 5 | KiCad 7.0 files for shield 6 | 7 | [![IMAGE ALT TEXT](http://img.youtube.com/vi/hoFy992Y98c/0.jpg)](http://www.youtube.com/watch?v=hoFy992Y98c "Video Title") 8 | 9 | Link to youtube video : (https://youtu.be/hoFy992Y98c) 10 | 11 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: mortens-lab 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | polar: # Replace with a single Polar username 13 | buy_me_a_coffee: # Replace with a single Buy Me a Coffee username 14 | thanks_dev: # Replace with a single thanks.dev username 15 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 16 | -------------------------------------------------------------------------------- /Micro Python/micro_python.txt: -------------------------------------------------------------------------------- 1 | #import FreeMono9pt7b 2 | import time 3 | import board 4 | import displayio 5 | import rgbmatrix 6 | import terminalio 7 | import framebufferio 8 | 9 | #from adafruit_display_shapes.rect import Rect 10 | #from adafruit_display_shapes.polygon import Polygon 11 | from adafruit_bitmap_font import bitmap_font 12 | from adafruit_display_text.label import Label 13 | #from adafruit_matrixportal.network import Network 14 | #from adafruit_matrixportal.matrix import Matrix 15 | 16 | displayio.release_displays() 17 | 18 | matrix = rgbmatrix.RGBMatrix( 19 | width=64, height=64, bit_depth=3, 20 | rgb_pins=[board.GP0, board.GP1, board.GP2, board.GP3, board.GP4, board.GP5], 21 | addr_pins=[board.GP6, board.GP7, board.GP8, board.GP9, board.GP10], 22 | clock_pin=board.GP11, latch_pin=board.GP12, output_enable_pin=board.GP13, 23 | doublebuffer=True) 24 | 25 | display = framebufferio.FramebufferDisplay(matrix, auto_refresh=True) 26 | # --- Content Setup --- 27 | #deco_font = bitmap_font.load_font("/BellotaText-Bold-21.bdf") 28 | 29 | 0 30 | group = displayio.Group() 31 | # Create a color palette 32 | color = displayio.Palette(4) 33 | color[0] = 0x000000 # black 34 | color[1] = 0xFF0000 # red 35 | color[2] = 0x444444 # dim white 36 | color[3] = 0xDD8000 # gold 37 | 38 | # text positions 39 | line1 = Label( 40 | terminalio.FONT, 41 | color=0xff0000, 42 | text="MORTEN") 43 | line1.x = 1 44 | line1.y = 8 45 | 46 | line2 = Label( 47 | terminalio.FONT, 48 | color=0xffffff, 49 | scale=2, 50 | text="458") 51 | line2.x = 1 52 | line2.y = 24 53 | 54 | line3= Label( 55 | terminalio.FONT, 56 | color=0xffffff, 57 | text="madebymorten") 58 | line3.x = 1 59 | line3.y = 54 60 | 61 | # Put each line of text into a Group, then show that group. 62 | g = displayio.Group() 63 | g.append(line1) 64 | g.append(line2) 65 | g.append(line3) 66 | 67 | display.show(g) 68 | time.sleep(2.5) 69 | #display.fill(0) 70 | display.show(g) 71 | 72 | 73 | 74 | 75 | # Create a bitmap with two colors 76 | bitmap = displayio.Bitmap(display.width, display.height, 4) 77 | 78 | # Create a two color palette 79 | palette = displayio.Palette(4) 80 | palette[0] = 0x000000 81 | palette[1] = 0x202020 82 | palette[2] = 0x200000 83 | palette[3] = 0x402000 84 | 85 | 86 | # Create a TileGrid using the Bitmap and Palette 87 | tile_grid = displayio.TileGrid(bitmap, pixel_shader=palette) 88 | 89 | # Create a Group 90 | gg = displayio.Group() 91 | 92 | # Add the TileGrid to the Group 93 | gg.append(tile_grid) 94 | 95 | # Add the Group to the Display 96 | display.show(gg) 97 | 98 | def box(x1,y1,x2,y2,color): 99 | for x in range(x1, x2): 100 | for y in range(y1, y2): 101 | bitmap[x, y] = color 102 | 103 | 104 | # Draw a pixel 105 | bitmap[40, 50] = 1 106 | 107 | # Draw even more pixels 108 | box(19,3,45,4,2) 109 | box(15,4,49,5,2) 110 | box(13,5,51,6,2) 111 | box(12,6,52,7,2) 112 | box(11,7,53,11,2) 113 | box(10,11,54,26,2) 114 | box(11,26,53,30,2) 115 | box(12,30,52,31,2) 116 | box(13,31,51,32,2) 117 | box(15,32,49,33,2) 118 | box(19,33,45,34,2) 119 | 120 | box(27,12,29,25,1) 121 | box(29,13,31,24,1) 122 | box(31,14,33,23,1) 123 | box(33,15,35,22,1) 124 | box(35,16,37,21,1) 125 | bitmap[37,17] = 1 126 | bitmap[37,18] = 1 127 | bitmap[37,19] = 1 128 | bitmap[38,18] = 1 129 | 130 | #display.refresh(minimum_frames_per_second=50) 131 | 132 | display.refresh(target_frames_per_second=2, minimum_frames_per_second=2) 133 | 134 | while True: 135 | bitmap[41,51] = 0 136 | time.sleep(1.0) 137 | bitmap[41,51] = 1 138 | time.sleep(1.0) 139 | 140 | 141 | -------------------------------------------------------------------------------- /Micro Python/urequests.py: -------------------------------------------------------------------------------- 1 | import usocket 2 | 3 | class Response: 4 | 5 | def __init__(self, f): 6 | self.raw = f 7 | self.encoding = "utf-8" 8 | self._cached = None 9 | 10 | def close(self): 11 | if self.raw: 12 | self.raw.close() 13 | self.raw = None 14 | self._cached = None 15 | 16 | @property 17 | def content(self): 18 | if self._cached is None: 19 | try: 20 | self._cached = self.raw.read() 21 | finally: 22 | self.raw.close() 23 | self.raw = None 24 | return self._cached 25 | 26 | @property 27 | def text(self): 28 | return str(self.content, self.encoding) 29 | 30 | def json(self): 31 | import ujson 32 | return ujson.loads(self.content) 33 | 34 | 35 | def request(method, url, data=None, json=None, headers={}, stream=None): 36 | try: 37 | proto, dummy, host, path = url.split("/", 3) 38 | except ValueError: 39 | proto, dummy, host = url.split("/", 2) 40 | path = "" 41 | if proto == "http:": 42 | port = 80 43 | elif proto == "https:": 44 | import ussl 45 | port = 443 46 | else: 47 | raise ValueError("Unsupported protocol: " + proto) 48 | 49 | if ":" in host: 50 | host, port = host.split(":", 1) 51 | port = int(port) 52 | 53 | ai = usocket.getaddrinfo(host, port, 0, usocket.SOCK_STREAM) 54 | 55 | try: 56 | ai = ai[0] 57 | except: 58 | print("Count not resolve getaddrinfo for {} {}".format(host,port)) 59 | 60 | s = usocket.socket(ai[0], ai[1], ai[2]) 61 | try: 62 | s.connect(ai[-1]) 63 | if proto == "https:": 64 | s = ussl.wrap_socket(s, server_hostname=host) 65 | s.write(b"%s /%s HTTP/1.0\r\n" % (method, path)) 66 | if not "Host" in headers: 67 | s.write(b"Host: %s\r\n" % host) 68 | # Iterate over keys to avoid tuple alloc 69 | for k in headers: 70 | s.write(k) 71 | s.write(b": ") 72 | s.write(headers[k]) 73 | s.write(b"\r\n") 74 | if json is not None: 75 | assert data is None 76 | import ujson 77 | data = ujson.dumps(json) 78 | s.write(b"Content-Type: application/json\r\n") 79 | if data: 80 | s.write(b"Content-Length: %d\r\n" % len(data)) 81 | s.write(b"\r\n") 82 | if data: 83 | s.write(data) 84 | 85 | l = s.readline() 86 | #print(l) 87 | l = l.split(None, 2) 88 | status = int(l[1]) 89 | reason = "" 90 | if len(l) > 2: 91 | reason = l[2].rstrip() 92 | while True: 93 | l = s.readline() 94 | if not l or l == b"\r\n": 95 | break 96 | #print(l) 97 | if l.startswith(b"Transfer-Encoding:"): 98 | if b"chunked" in l: 99 | raise ValueError("Unsupported " + l) 100 | elif l.startswith(b"Location:") and not 200 <= status <= 299: 101 | raise NotImplementedError("Redirects not yet supported") 102 | except OSError: 103 | s.close() 104 | raise 105 | 106 | resp = Response(s) 107 | resp.status_code = status 108 | resp.reason = reason 109 | return resp 110 | 111 | 112 | def head(url, **kw): 113 | return request("HEAD", url, **kw) 114 | 115 | def get(url, **kw): 116 | return request("GET", url, **kw) 117 | 118 | def post(url, **kw): 119 | return request("POST", url, **kw) 120 | 121 | def put(url, **kw): 122 | return request("PUT", url, **kw) 123 | 124 | def patch(url, **kw): 125 | return request("PATCH", url, **kw) 126 | 127 | def delete(url, **kw): 128 | return request("DELETE", url, **kw) -------------------------------------------------------------------------------- /Micro Python/network_manager.py: -------------------------------------------------------------------------------- 1 | import rp2 2 | import network 3 | import machine 4 | import uasyncio 5 | 6 | 7 | class NetworkManager: 8 | _ifname = ("Client", "Access Point") 9 | 10 | def __init__(self, country="GB", client_timeout=60, access_point_timeout=5, status_handler=None, error_handler=None): 11 | rp2.country(country) 12 | self._ap_if = network.WLAN(network.AP_IF) 13 | self._sta_if = network.WLAN(network.STA_IF) 14 | 15 | self._mode = network.STA_IF 16 | self._client_timeout = client_timeout 17 | self._access_point_timeout = access_point_timeout 18 | self._status_handler = status_handler 19 | self._error_handler = error_handler 20 | self.UID = ("{:02X}" * 8).format(*machine.unique_id()) 21 | 22 | def isconnected(self): 23 | return self._sta_if.isconnected() or self._ap_if.isconnected() 24 | 25 | def config(self, var): 26 | if self._sta_if.active(): 27 | return self._sta_if.config(var) 28 | else: 29 | if var == "password": 30 | return self.UID 31 | return self._ap_if.config(var) 32 | 33 | def mode(self): 34 | if self._sta_if.isconnected(): 35 | return self._ifname[0] 36 | if self._ap_if.isconnected(): 37 | return self._ifname[1] 38 | return None 39 | 40 | def ifaddress(self): 41 | if self._sta_if.isconnected(): 42 | return self._sta_if.ifconfig()[0] 43 | if self._ap_if.isconnected(): 44 | return self._ap_if.ifconfig()[0] 45 | return '0.0.0.0' 46 | 47 | def disconnect(self): 48 | if self._sta_if.isconnected(): 49 | self._sta_if.disconnect() 50 | if self._ap_if.isconnected(): 51 | self._ap_if.disconnect() 52 | 53 | async def wait(self, mode): 54 | while not self.isconnected(): 55 | self._handle_status(mode, None) 56 | await uasyncio.sleep_ms(1000) 57 | 58 | def _handle_status(self, mode, status): 59 | if callable(self._status_handler): 60 | self._status_handler(self._ifname[mode], status, self.ifaddress()) 61 | 62 | def _handle_error(self, mode, msg): 63 | if callable(self._error_handler): 64 | if self._error_handler(self._ifname[mode], msg): 65 | return 66 | raise RuntimeError(msg) 67 | 68 | async def client(self, ssid, psk): 69 | if self._sta_if.isconnected(): 70 | self._handle_status(network.STA_IF, True) 71 | return 72 | 73 | self._ap_if.disconnect() 74 | self._ap_if.active(False) 75 | 76 | self._sta_if.active(True) 77 | self._sta_if.config(pm=0xa11140) 78 | self._sta_if.connect(ssid, psk) 79 | 80 | try: 81 | await uasyncio.wait_for(self.wait(network.STA_IF), self._client_timeout) 82 | self._handle_status(network.STA_IF, True) 83 | 84 | except uasyncio.TimeoutError: 85 | self._sta_if.active(False) 86 | self._handle_status(network.STA_IF, False) 87 | self._handle_error(network.STA_IF, "WIFI Client Failed") 88 | 89 | async def access_point(self): 90 | if self._ap_if.isconnected(): 91 | self._handle_status(network.AP_IF, True) 92 | return 93 | 94 | self._sta_if.disconnect() 95 | self._sta_if.active(False) 96 | 97 | self._ap_if.ifconfig(("10.10.1.1", "255.255.255.0", "10.10.1.1", "10.10.1.1")) 98 | self._ap_if.config(password=self.UID) 99 | self._ap_if.active(True) 100 | 101 | try: 102 | await uasyncio.wait_for(self.wait(network.AP_IF), self._access_point_timeout) 103 | self._handle_status(network.AP_IF, True) 104 | 105 | except uasyncio.TimeoutError: 106 | self._sta_if.active(False) 107 | self._handle_status(network.AP_IF, False) 108 | self._handle_error(network.AP_IF, "WIFI Client Failed") 109 | -------------------------------------------------------------------------------- /Micro Python/micropython_youtube_api.py: -------------------------------------------------------------------------------- 1 | # The MIT License (MIT) 2 | # 3 | # Copyright (c) 2019 Seon "Unexpected Maker" Rozenblum 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | """ 24 | `micropython_youtube_api` - YouTube API 25 | ==================================================== 26 | See examples folder for how to use 27 | * Author(s): Seon Rozenblum 28 | """ 29 | 30 | __version__ = "0.0.0-auto.0" 31 | __repo__ = "https://github.com/unexpectedmaker/micropython-youtube-api" 32 | 33 | import urequests as ureq 34 | import json, time 35 | 36 | class YoutubeAPI: 37 | 38 | def __init__(self, channel_id, app_key_id, query_interval_sec=60): 39 | if not isinstance(channel_id, str): 40 | raise TypeError("'channel_id' must be provided") 41 | self.channel_id = channel_id 42 | if not isinstance(app_key_id, str): 43 | raise TypeError("'app_key_id' must be provided") 44 | self.app_key_id = app_key_id 45 | if not isinstance(query_interval_sec, int): 46 | raise TypeError("'query_interval_sec' must be an int") 47 | self.query_interval_sec = query_interval_sec 48 | self._update_stats_time = time.time() - 10 49 | 50 | # cached stat data 51 | self._subs = 0 52 | self._views = 0 53 | self._comments = 0 54 | self._videos = 0 55 | 56 | def __enter__(self): 57 | return self 58 | 59 | def __exit__(self, *args): 60 | pass 61 | 62 | # Update the stats is the correct time interval has passed 63 | def _update_stats(self): 64 | if self._update_stats_time < time.time(): 65 | self._grab_stats() 66 | self._update_stats_time = time.time() + self.query_interval_sec 67 | 68 | def _grab_stats(self): 69 | # Create the API query to send to GoogleAPI 70 | urlbase = "https://www.googleapis.com/youtube/v3/channels" 71 | youtube_url = "{}?part=statistics&id={}&key={}".format(urlbase, self.channel_id, self.app_key_id ) 72 | 73 | #print ("Contacting GoogleAPI... " ) 74 | 75 | # request the data from Google 76 | req = ureq.get(youtube_url) 77 | if req.status_code == 200: 78 | stats = [{ 79 | 'subs': stat['statistics']['subscriberCount'], 80 | 'views': stat['statistics']['viewCount'], 81 | 'videos': stat['statistics']['videoCount'], 82 | 'comments': stat['statistics']['commentCount'] 83 | } for stat in req.json()['items']] 84 | 85 | # for stat in YoutubeApi.stats 86 | self._subs = stats[0]['subs'] 87 | self._views = stats[0]['views'] 88 | self._videos = stats[0]['videos'] 89 | self._comments = stats[0]['comments'] 90 | else: 91 | print( "ERROR: status_code: " + str(req.status_code) ) 92 | req.close() 93 | 94 | # Accessorss for each of the stats returned by the API 95 | @property 96 | def subs(self): 97 | self._update_stats() 98 | return self._subs 99 | 100 | @property 101 | def views(self): 102 | self._update_stats() 103 | return self._views 104 | 105 | @property 106 | def videos(self): 107 | self._update_stats() 108 | return self._videos 109 | 110 | @property 111 | def comments(self): 112 | self._update_stats() 113 | return self._comments 114 | -------------------------------------------------------------------------------- /Micro Python/FreeMono9pt7b.py: -------------------------------------------------------------------------------- 1 | FreeMono9pt7bBitmaps = [ 2 | 0xAA, 0xA8, 0x0C, 0xED, 0x24, 0x92, 0x48, 0x24, 0x48, 0x91, 0x2F, 0xE4, 3 | 0x89, 0x7F, 0x28, 0x51, 0x22, 0x40, 0x08, 0x3E, 0x62, 0x40, 0x30, 0x0E, 4 | 0x01, 0x81, 0xC3, 0xBE, 0x08, 0x08, 0x71, 0x12, 0x23, 0x80, 0x23, 0xB8, 5 | 0x0E, 0x22, 0x44, 0x70, 0x38, 0x81, 0x02, 0x06, 0x1A, 0x65, 0x46, 0xC8, 6 | 0xEC, 0xE9, 0x24, 0x5A, 0xAA, 0xA9, 0x40, 0xA9, 0x55, 0x5A, 0x80, 0x10, 7 | 0x22, 0x4B, 0xE3, 0x05, 0x11, 0x00, 0x10, 0x20, 0x47, 0xF1, 0x02, 0x04, 8 | 0x00, 0x6B, 0x48, 0xFF, 0x00, 0xF0, 0x02, 0x08, 0x10, 0x60, 0x81, 0x04, 9 | 0x08, 0x20, 0x41, 0x02, 0x08, 0x00, 0x38, 0x8A, 0x0C, 0x18, 0x30, 0x60, 10 | 0xC1, 0x82, 0x88, 0xE0, 0x27, 0x28, 0x42, 0x10, 0x84, 0x21, 0x3E, 0x38, 11 | 0x8A, 0x08, 0x10, 0x20, 0x82, 0x08, 0x61, 0x03, 0xF8, 0x7C, 0x06, 0x02, 12 | 0x02, 0x1C, 0x06, 0x01, 0x01, 0x01, 0x42, 0x3C, 0x18, 0xA2, 0x92, 0x8A, 13 | 0x28, 0xBF, 0x08, 0x21, 0xC0, 0x7C, 0x81, 0x03, 0xE4, 0x40, 0x40, 0x81, 14 | 0x03, 0x88, 0xE0, 0x1E, 0x41, 0x04, 0x0B, 0x98, 0xB0, 0xC1, 0xC2, 0x88, 15 | 0xE0, 0xFE, 0x04, 0x08, 0x20, 0x40, 0x82, 0x04, 0x08, 0x20, 0x40, 0x38, 16 | 0x8A, 0x0C, 0x14, 0x47, 0x11, 0x41, 0x83, 0x8C, 0xE0, 0x38, 0x8A, 0x1C, 17 | 0x18, 0x68, 0xCE, 0x81, 0x04, 0x13, 0xC0, 0xF0, 0x0F, 0x6C, 0x00, 0xD2, 18 | 0xD2, 0x00, 0x03, 0x04, 0x18, 0x60, 0x60, 0x18, 0x04, 0x03, 0xFF, 0x80, 19 | 0x00, 0x1F, 0xF0, 0x40, 0x18, 0x03, 0x00, 0x60, 0x20, 0x60, 0xC0, 0x80, 20 | 0x3D, 0x84, 0x08, 0x30, 0xC2, 0x00, 0x00, 0x00, 0x30, 0x3C, 0x46, 0x82, 21 | 0x8E, 0xB2, 0xA2, 0xA2, 0x9F, 0x80, 0x80, 0x40, 0x3C, 0x3C, 0x01, 0x40, 22 | 0x28, 0x09, 0x01, 0x10, 0x42, 0x0F, 0xC1, 0x04, 0x40, 0x9E, 0x3C, 0xFE, 23 | 0x21, 0x90, 0x48, 0x67, 0xE2, 0x09, 0x02, 0x81, 0x41, 0xFF, 0x80, 0x3E, 24 | 0xB0, 0xF0, 0x30, 0x08, 0x04, 0x02, 0x00, 0x80, 0x60, 0x8F, 0x80, 0xFE, 25 | 0x21, 0x90, 0x68, 0x14, 0x0A, 0x05, 0x02, 0x83, 0x43, 0x7F, 0x00, 0xFF, 26 | 0x20, 0x90, 0x08, 0x87, 0xC2, 0x21, 0x00, 0x81, 0x40, 0xFF, 0xC0, 0xFF, 27 | 0xA0, 0x50, 0x08, 0x87, 0xC2, 0x21, 0x00, 0x80, 0x40, 0x78, 0x00, 0x1E, 28 | 0x98, 0x6C, 0x0A, 0x00, 0x80, 0x20, 0xF8, 0x0B, 0x02, 0x60, 0x87, 0xC0, 29 | 0xE3, 0xA0, 0x90, 0x48, 0x27, 0xF2, 0x09, 0x04, 0x82, 0x41, 0x71, 0xC0, 30 | 0xF9, 0x08, 0x42, 0x10, 0x84, 0x27, 0xC0, 0x1F, 0x02, 0x02, 0x02, 0x02, 31 | 0x02, 0x82, 0x82, 0xC6, 0x78, 0xE3, 0xA1, 0x11, 0x09, 0x05, 0x83, 0x21, 32 | 0x08, 0x84, 0x41, 0x70, 0xC0, 0xE0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x41, 33 | 0x41, 0x41, 0xFF, 0xE0, 0xEC, 0x19, 0x45, 0x28, 0xA4, 0xA4, 0x94, 0x91, 34 | 0x12, 0x02, 0x40, 0x5C, 0x1C, 0xC3, 0xB0, 0x94, 0x4A, 0x24, 0x92, 0x49, 35 | 0x14, 0x8A, 0x43, 0x70, 0x80, 0x1E, 0x31, 0x90, 0x50, 0x18, 0x0C, 0x06, 36 | 0x02, 0x82, 0x63, 0x0F, 0x00, 0xFE, 0x43, 0x41, 0x41, 0x42, 0x7C, 0x40, 37 | 0x40, 0x40, 0xF0, 0x1C, 0x31, 0x90, 0x50, 0x18, 0x0C, 0x06, 0x02, 0x82, 38 | 0x63, 0x1F, 0x04, 0x07, 0x92, 0x30, 0xFE, 0x21, 0x90, 0x48, 0x24, 0x23, 39 | 0xE1, 0x10, 0x84, 0x41, 0x70, 0xC0, 0x3A, 0xCD, 0x0A, 0x03, 0x01, 0x80, 40 | 0xC1, 0xC7, 0x78, 0xFF, 0xC4, 0x62, 0x21, 0x00, 0x80, 0x40, 0x20, 0x10, 41 | 0x08, 0x1F, 0x00, 0xE3, 0xA0, 0x90, 0x48, 0x24, 0x12, 0x09, 0x04, 0x82, 42 | 0x22, 0x0E, 0x00, 0xF1, 0xE8, 0x10, 0x82, 0x10, 0x42, 0x10, 0x22, 0x04, 43 | 0x80, 0x50, 0x0C, 0x00, 0x80, 0xF1, 0xE8, 0x09, 0x11, 0x25, 0x44, 0xA8, 44 | 0x55, 0x0C, 0xA1, 0x8C, 0x31, 0x84, 0x30, 0xE3, 0xA0, 0x88, 0x82, 0x80, 45 | 0x80, 0xC0, 0x90, 0x44, 0x41, 0x71, 0xC0, 0xE3, 0xA0, 0x88, 0x82, 0x81, 46 | 0x40, 0x40, 0x20, 0x10, 0x08, 0x1F, 0x00, 0xFD, 0x0A, 0x20, 0x81, 0x04, 47 | 0x10, 0x21, 0x83, 0xFC, 0xEA, 0xAA, 0xAA, 0xC0, 0x80, 0x81, 0x03, 0x02, 48 | 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0xD5, 0x55, 0x55, 0xC0, 49 | 0x10, 0x51, 0x22, 0x28, 0x20, 0xFF, 0xE0, 0x88, 0x80, 0x7E, 0x00, 0x80, 50 | 0x47, 0xEC, 0x14, 0x0A, 0x0C, 0xFB, 0xC0, 0x20, 0x10, 0x0B, 0xC6, 0x12, 51 | 0x05, 0x02, 0x81, 0x40, 0xB0, 0xB7, 0x80, 0x3A, 0x8E, 0x0C, 0x08, 0x10, 52 | 0x10, 0x9E, 0x03, 0x00, 0x80, 0x47, 0xA4, 0x34, 0x0A, 0x05, 0x02, 0x81, 53 | 0x21, 0x8F, 0x60, 0x3C, 0x43, 0x81, 0xFF, 0x80, 0x80, 0x61, 0x3E, 0x3D, 54 | 0x04, 0x3E, 0x41, 0x04, 0x10, 0x41, 0x0F, 0x80, 0x3D, 0xA1, 0xA0, 0x50, 55 | 0x28, 0x14, 0x09, 0x0C, 0x7A, 0x01, 0x01, 0x87, 0x80, 0xC0, 0x20, 0x10, 56 | 0x0B, 0xC6, 0x32, 0x09, 0x04, 0x82, 0x41, 0x20, 0xB8, 0xE0, 0x10, 0x01, 57 | 0xC0, 0x81, 0x02, 0x04, 0x08, 0x11, 0xFC, 0x10, 0x3E, 0x10, 0x84, 0x21, 58 | 0x08, 0x42, 0x3F, 0x00, 0xC0, 0x40, 0x40, 0x4F, 0x44, 0x58, 0x70, 0x48, 59 | 0x44, 0x42, 0xC7, 0x70, 0x20, 0x40, 0x81, 0x02, 0x04, 0x08, 0x10, 0x23, 60 | 0xF8, 0xB7, 0x64, 0x62, 0x31, 0x18, 0x8C, 0x46, 0x23, 0x91, 0x5E, 0x31, 61 | 0x90, 0x48, 0x24, 0x12, 0x09, 0x05, 0xC7, 0x3E, 0x31, 0xA0, 0x30, 0x18, 62 | 0x0C, 0x05, 0x8C, 0x7C, 0xDE, 0x30, 0x90, 0x28, 0x14, 0x0A, 0x05, 0x84, 63 | 0xBC, 0x40, 0x20, 0x38, 0x00, 0x3D, 0xA1, 0xA0, 0x50, 0x28, 0x14, 0x09, 64 | 0x0C, 0x7A, 0x01, 0x00, 0x80, 0xE0, 0xCE, 0xA1, 0x82, 0x04, 0x08, 0x10, 65 | 0x7C, 0x3A, 0x8D, 0x0B, 0x80, 0xF0, 0x70, 0xDE, 0x40, 0x40, 0xFC, 0x40, 66 | 0x40, 0x40, 0x40, 0x40, 0x41, 0x3E, 0xC3, 0x41, 0x41, 0x41, 0x41, 0x41, 67 | 0x43, 0x3D, 0xE3, 0xA0, 0x90, 0x84, 0x42, 0x20, 0xA0, 0x50, 0x10, 0xE3, 68 | 0xC0, 0x92, 0x4B, 0x25, 0x92, 0xA9, 0x98, 0x44, 0xE3, 0x31, 0x05, 0x01, 69 | 0x01, 0x41, 0x11, 0x05, 0xC7, 0xE3, 0xA0, 0x90, 0x84, 0x42, 0x40, 0xA0, 70 | 0x60, 0x10, 0x10, 0x08, 0x3E, 0x00, 0xFD, 0x08, 0x20, 0x82, 0x08, 0x10, 71 | 0xBF, 0x29, 0x24, 0xA2, 0x49, 0x26, 0xFF, 0xF8, 0x89, 0x24, 0x8A, 0x49, 72 | 0x2C, 0x61, 0x24, 0x30] 73 | 74 | FreeMono9pt7bGlyphs = [ 75 | #Index, W, H,xAdv,dX, dY 76 | [0, 0, 0, 11, 0, 1], # 0x20 ' ' 77 | [0, 2, 11, 11, 4, -10], # 0x21 '!' 78 | [3, 6, 5, 11, 2, -10], # 0x22 '"' 79 | [7, 7, 12, 11, 2, -10], # 0x23 '#' 80 | [18, 8, 12, 11, 1, -10], # 0x24 '$' 81 | [30, 7, 11, 11, 2, -10], # 0x25 '%' 82 | [40, 7, 10, 11, 2, -9], # 0x26 '&' 83 | [49, 3, 5, 11, 4, -10], # 0x27 ''' 84 | [51, 2, 13, 11, 5, -10], # 0x28 '(' 85 | [55, 2, 13, 11, 4, -10], # 0x29 ')' 86 | [59, 7, 7, 11, 2, -10], # 0x2A '*' 87 | [66, 7, 7, 11, 2, -8], # 0x2B '+' 88 | [73, 3, 5, 11, 2, -1], # 0x2C ',' 89 | [75, 9, 1, 11, 1, -5], # 0x2D '-' 90 | [77, 2, 2, 11, 4, -1], # 0x2E '.' 91 | [78, 7, 13, 11, 2, -11], # 0x2F '/' 92 | [90, 7, 11, 11, 2, -10], # 0x30 '0' 93 | [100, 5, 11, 11, 3, -10], # 0x31 '1' 94 | [107, 7, 11, 11, 2, -10], # 0x32 '2' 95 | [117, 8, 11, 11, 1, -10], # 0x33 '3' 96 | [128, 6, 11, 11, 3, -10], # 0x34 '4' 97 | [137, 7, 11, 11, 2, -10], # 0x35 '5' 98 | [147, 7, 11, 11, 2, -10], # 0x36 '6' 99 | [157, 7, 11, 11, 2, -10], # 0x37 '7' 100 | [167, 7, 11, 11, 2, -10], # 0x38 '8' 101 | [177, 7, 11, 11, 2, -10], # 0x39 '9' 102 | [187, 2, 8, 11, 4, -7], # 0x3A ':' 103 | [189, 3, 11, 11, 3, -7], # 0x3B ';' 104 | [194, 8, 8, 11, 1, -8], # 0x3C '<' 105 | [202, 9, 4, 11, 1, -6], # 0x3D '=' 106 | [207, 9, 8, 11, 1, -8], # 0x3E '>' 107 | [216, 7, 10, 11, 2, -9], # 0x3F '?' 108 | [225, 8, 12, 11, 2, -10], # 0x40 '@' 109 | [237, 11, 10, 11, 0, -9], # 0x41 'A' 110 | [251, 9, 10, 11, 1, -9], # 0x42 'B' 111 | [263, 9, 10, 11, 1, -9], # 0x43 'C' 112 | [275, 9, 10, 11, 1, -9], # 0x44 'D' 113 | [287, 9, 10, 11, 1, -9], # 0x45 'E' 114 | [299, 9, 10, 11, 1, -9], # 0x46 'F' 115 | [311, 10, 10, 11, 1, -9], # 0x47 'G' 116 | [324, 9, 10, 11, 1, -9], # 0x48 'H' 117 | [336, 5, 10, 11, 3, -9], # 0x49 'I' 118 | [343, 8, 10, 11, 2, -9], # 0x4A 'J' 119 | [353, 9, 10, 11, 1, -9], # 0x4B 'K' 120 | [365, 8, 10, 11, 2, -9], # 0x4C 'L' 121 | [375, 11, 10, 11, 0, -9], # 0x4D 'M' 122 | [389, 9, 10, 11, 1, -9], # 0x4E 'N' 123 | [401, 9, 10, 11, 1, -9], # 0x4F 'O' 124 | [413, 8, 10, 11, 1, -9], # 0x50 'P' 125 | [423, 9, 13, 11, 1, -9], # 0x51 'Q' 126 | [438, 9, 10, 11, 1, -9], # 0x52 'R' 127 | [450, 7, 10, 11, 2, -9], # 0x53 'S' 128 | [459, 9, 10, 11, 1, -9], # 0x54 'T' 129 | [471, 9, 10, 11, 1, -9], # 0x55 'U' 130 | [483, 11, 10, 11, 0, -9], # 0x56 'V' 131 | [497, 11, 10, 11, 0, -9], # 0x57 'W' 132 | [511, 9, 10, 11, 1, -9], # 0x58 'X' 133 | [523, 9, 10, 11, 1, -9], # 0x59 'Y' 134 | [535, 7, 10, 11, 2, -9], # 0x5A 'Z' 135 | [544, 2, 13, 11, 5, -10], # 0x5B '[' 136 | [548, 7, 13, 11, 2, -11], # 0x5C '\' 137 | [560, 2, 13, 11, 4, -10], # 0x5D ']' 138 | [564, 7, 5, 11, 2, -10], # 0x5E '^' 139 | [569, 11, 1, 11, 0, 2], # 0x5F '_' 140 | [571, 3, 3, 11, 3, -11], # 0x60 '`' 141 | [573, 9, 8, 11, 1, -7], # 0x61 'a' 142 | [582, 9, 11, 11, 1, -10], # 0x62 'b' 143 | [595, 7, 8, 11, 2, -7], # 0x63 'c' 144 | [602, 9, 11, 11, 1, -10], # 0x64 'd' 145 | [615, 8, 8, 11, 1, -7], # 0x65 'e' 146 | [623, 6, 11, 11, 3, -10], # 0x66 'f' 147 | [632, 9, 11, 11, 1, -7], # 0x67 'g' 148 | [645, 9, 11, 11, 1, -10], # 0x68 'h' 149 | [658, 7, 10, 11, 2, -9], # 0x69 'i' 150 | [667, 5, 13, 11, 3, -9], # 0x6A 'j' 151 | [676, 8, 11, 11, 2, -10], # 0x6B 'k' 152 | [687, 7, 11, 11, 2, -10], # 0x6C 'l' 153 | [697, 9, 8, 11, 1, -7], # 0x6D 'm' 154 | [706, 9, 8, 11, 1, -7], # 0x6E 'n' 155 | [715, 9, 8, 11, 1, -7], # 0x6F 'o' 156 | [724, 9, 11, 11, 1, -7], # 0x70 'p' 157 | [737, 9, 11, 11, 1, -7], # 0x71 'q' 158 | [750, 7, 8, 11, 3, -7], # 0x72 'r' 159 | [757, 7, 8, 11, 2, -7], # 0x73 's' 160 | [764, 8, 10, 11, 2, -9], # 0x74 't' 161 | [774, 8, 8, 11, 1, -7], # 0x75 'u' 162 | [782, 9, 8, 11, 1, -7], # 0x76 'v' 163 | [791, 9, 8, 11, 1, -7], # 0x77 'w' 164 | [800, 9, 8, 11, 1, -7], # 0x78 'x' 165 | [809, 9, 11, 11, 1, -7], # 0x79 'y' 166 | [822, 7, 8, 11, 2, -7], # 0x7A 'z' 167 | [829, 3, 13, 11, 4, -10], # 0x7B '[' 168 | [834, 1, 13, 11, 5, -10], # 0x7C '|' 169 | [836, 3, 13, 11, 4, -10], # 0x7D ']' 170 | [841, 7, 3, 11, 2, -6]] # 0x7E '~' -------------------------------------------------------------------------------- /Micro Python/main_yt.py: -------------------------------------------------------------------------------- 1 | ''' 2 | raw_set_pixel.py 3 | This example shows how to set the pixels on the display individually without having to use pico graphics. 4 | This method can be used to save on memory usage. 5 | ''' 6 | 7 | import time 8 | import network 9 | import uasyncio as asyncio 10 | from machine import Pin 11 | import machine 12 | import WIFI_CONFIG 13 | import hub75 14 | from network_manager import NetworkManager 15 | import ntptime 16 | from micropython_youtube_api import YoutubeAPI 17 | import json 18 | import os 19 | from machine import I2S 20 | 21 | 22 | 23 | 24 | WIDTH = 64 25 | HEIGHT = 64 26 | p1 = 40 27 | 28 | matrix = hub75.Hub75(WIDTH, HEIGHT, panel_type=hub75.PANEL_FM6126A) 29 | 30 | # create the rtc object 31 | rtc = machine.RTC() 32 | 33 | matrix.start() 34 | matrix.clear() 35 | try: 36 | from secrets import WIFI_SSID, WIFI_PASSWORD 37 | wifi_available = True 38 | except ImportError: 39 | print("Create secrets.py with your WiFi credentials to get time from NTP") 40 | wifi_available = False 41 | 42 | 43 | # Hardware definitions 44 | led = Pin("LED", Pin.OUT, value=1) 45 | 46 | #HEIGHT = 64 47 | #WIDTH = 64 48 | #MAX_PIXELS = 64 49 | 50 | #h75 = hub75.Hub75(WIDTH, HEIGHT, stb_invert=False) 51 | 52 | #OK 53 | def font_0(x_pos): 54 | font_logic_line(x_pos, 0x0FFC) 55 | font_logic_line(x_pos+1,0x0FFC) 56 | font_logic_line(x_pos+2,0x3033) 57 | font_logic_line(x_pos+3,0x3033) 58 | font_logic_line(x_pos+4,0x30C3) 59 | font_logic_line(x_pos+5,0x30C3) 60 | font_logic_line(x_pos+6,0x3303) 61 | font_logic_line(x_pos+7,0x3303) 62 | font_logic_line(x_pos+8,0x0FFC) 63 | font_logic_line(x_pos+9,0x0FFC) 64 | #OK 65 | def font_1(x_pos): 66 | font_logic_line(x_pos, 0x0000) 67 | font_logic_line(x_pos+1,0x0000) 68 | font_logic_line(x_pos+2,0x0C03) 69 | font_logic_line(x_pos+3,0x0C03) 70 | font_logic_line(x_pos+4,0x3FFF) 71 | font_logic_line(x_pos+5,0x3FFF) 72 | font_logic_line(x_pos+6,0x0003) 73 | font_logic_line(x_pos+7,0x0003) 74 | font_logic_line(x_pos+8,0x0000) 75 | font_logic_line(x_pos+9,0x0000) 76 | #OK 77 | def font_2(x_pos): 78 | font_logic_line(x_pos, 0x0C3F) 79 | font_logic_line(x_pos+1,0x0C3F) 80 | font_logic_line(x_pos+2,0x30C3) 81 | font_logic_line(x_pos+3,0x30C3) 82 | font_logic_line(x_pos+4,0x30C3) 83 | font_logic_line(x_pos+5,0x30C3) 84 | font_logic_line(x_pos+6,0x30C3) 85 | font_logic_line(x_pos+7,0x30C3) 86 | font_logic_line(x_pos+8,0x0F03) 87 | font_logic_line(x_pos+9,0x0F03) 88 | #OK 89 | def font_3(x_pos): 90 | font_logic_line(x_pos, 0x300C) 91 | font_logic_line(x_pos+1,0x300C) 92 | font_logic_line(x_pos+2,0x3003) 93 | font_logic_line(x_pos+3,0x3003) 94 | font_logic_line(x_pos+4,0x30C3) 95 | font_logic_line(x_pos+5,0x30C3) 96 | font_logic_line(x_pos+6,0x33C3) 97 | font_logic_line(x_pos+7,0x33C3) 98 | font_logic_line(x_pos+8,0x3C3C) 99 | font_logic_line(x_pos+9,0x3C3C) 100 | #OK 101 | def font_4(x_pos): 102 | font_logic_line(x_pos, 0x00F0) 103 | font_logic_line(x_pos+1,0x00F0) 104 | font_logic_line(x_pos+2,0x0330) 105 | font_logic_line(x_pos+3,0x0330) 106 | font_logic_line(x_pos+4,0x0C30) 107 | font_logic_line(x_pos+5,0x0C30) 108 | font_logic_line(x_pos+6,0x3FFF) 109 | font_logic_line(x_pos+7,0x3FFF) 110 | font_logic_line(x_pos+8,0x0030) 111 | font_logic_line(x_pos+9,0x0030) 112 | #OK 113 | def font_5(x_pos): 114 | font_logic_line(x_pos, 0x3F0C) 115 | font_logic_line(x_pos+1,0x3F0C) 116 | font_logic_line(x_pos+2,0x3303) 117 | font_logic_line(x_pos+3,0x3303) 118 | font_logic_line(x_pos+4,0x3303) 119 | font_logic_line(x_pos+5,0x3303) 120 | font_logic_line(x_pos+6,0x3303) 121 | font_logic_line(x_pos+7,0x3303) 122 | font_logic_line(x_pos+8,0x30FC) 123 | font_logic_line(x_pos+9,0x30FC) 124 | #OK 125 | def font_6(x_pos): 126 | font_logic_line(x_pos, 0x03FC) 127 | font_logic_line(x_pos+1,0x03FC) 128 | font_logic_line(x_pos+2,0x0CC3) 129 | font_logic_line(x_pos+3,0x0CC3) 130 | font_logic_line(x_pos+4,0x30C3) 131 | font_logic_line(x_pos+5,0x30C3) 132 | font_logic_line(x_pos+6,0x30C3) 133 | font_logic_line(x_pos+7,0x30C3) 134 | font_logic_line(x_pos+8,0x303C) 135 | font_logic_line(x_pos+9,0x303C) 136 | #OK 137 | def font_7(x_pos): 138 | font_logic_line(x_pos, 0x3003) 139 | font_logic_line(x_pos+1,0x3003) 140 | font_logic_line(x_pos+2,0x300C) 141 | font_logic_line(x_pos+3,0x300C) 142 | font_logic_line(x_pos+4,0x3030) 143 | font_logic_line(x_pos+5,0x3030) 144 | font_logic_line(x_pos+6,0x30C0) 145 | font_logic_line(x_pos+7,0x30C0) 146 | font_logic_line(x_pos+8,0x3F00) 147 | font_logic_line(x_pos+9,0x3F00) 148 | #OK 149 | def font_8(x_pos): 150 | font_logic_line(x_pos, 0x0F3C) 151 | font_logic_line(x_pos+1,0x0F3C) 152 | font_logic_line(x_pos+2,0x30C3) 153 | font_logic_line(x_pos+3,0x30C3) 154 | font_logic_line(x_pos+4,0x30C3) 155 | font_logic_line(x_pos+5,0x30C3) 156 | font_logic_line(x_pos+6,0x30C3) 157 | font_logic_line(x_pos+7,0x30C3) 158 | font_logic_line(x_pos+8,0x0F3C) 159 | font_logic_line(x_pos+9,0x0F3C) 160 | #OK 161 | def font_9(x_pos): 162 | font_logic_line(x_pos, 0x0F03) 163 | font_logic_line(x_pos+1,0x0F03) 164 | font_logic_line(x_pos+2,0x30C3) 165 | font_logic_line(x_pos+3,0x30C3) 166 | font_logic_line(x_pos+4,0x30C3) 167 | font_logic_line(x_pos+5,0x30C3) 168 | font_logic_line(x_pos+6,0x30CC) 169 | font_logic_line(x_pos+7,0x30CC) 170 | font_logic_line(x_pos+8,0x0FF0) 171 | font_logic_line(x_pos+9,0x0FF0) 172 | 173 | z=0 174 | 175 | def font_logic_line(x,value): 176 | for y in range(0, 14): 177 | if value>>y & 1: 178 | matrix.set_pixel(x, 50-y, 90, 90, 90) 179 | 180 | else: 181 | matrix.set_pixel(x, 50-y, 0, 0, 0) 182 | 183 | 184 | 185 | 186 | def box(x1,y1,x2,y2,color): 187 | for x in range(x1, x2): 188 | for y in range(y1, y2): 189 | # bitmap[x, y] = color 190 | if color == 1: 191 | matrix.set_pixel(x, y, 90, 90, 90) 192 | 193 | if color == 2: 194 | matrix.set_pixel(x, y, 90, 0, 0) 195 | 196 | 197 | def logic_line(x,value): 198 | for y in range(0, 8): 199 | if value>>y & 1: 200 | matrix.set_pixel(x, 61-y, 90, 90, 90) 201 | 202 | else: 203 | matrix.set_pixel(x, 61-y, 0, 0, 0) 204 | 205 | 206 | # Draw even more pixels 207 | box(19,3,45,4,2) 208 | box(15,4,49,5,2) 209 | box(13,5,51,6,2) 210 | box(12,6,52,7,2) 211 | box(11,7,53,11,2) 212 | box(10,11,54,26,2) 213 | box(11,26,53,30,2) 214 | box(12,30,52,31,2) 215 | box(13,31,51,32,2) 216 | box(15,32,49,33,2) 217 | box(19,33,45,34,2) 218 | 219 | box(27,12,29,25,1) 220 | box(29,13,31,24,1) 221 | box(31,14,33,23,1) 222 | box(33,15,35,22,1) 223 | box(35,16,37,21,1) 224 | matrix.set_pixel(37,17,100,100,100) 225 | matrix.set_pixel(37,18,100,100,100) 226 | matrix.set_pixel(37,19,100,100,100) 227 | matrix.set_pixel(38,18,100,100,100) 228 | #m 229 | logic_line(2,0x3F) 230 | logic_line(3,0x20) 231 | logic_line(4,0x38) 232 | logic_line(5,0x20) 233 | logic_line(6,0x1F) 234 | #a 235 | logic_line(8,0x16) 236 | logic_line(9,0x29) 237 | logic_line(10,0x29) 238 | logic_line(11,0x1F) 239 | #d 240 | logic_line(13,0x1e) 241 | logic_line(14,0x21) 242 | logic_line(15,0x21) 243 | logic_line(16,0xFF) 244 | #e 245 | logic_line(18,0x1e) 246 | logic_line(19,0x29) 247 | logic_line(20,0x29) 248 | logic_line(21,0x18) 249 | 250 | #b 251 | logic_line(24,0xFF) 252 | logic_line(25,0x21) 253 | logic_line(26,0x21) 254 | logic_line(27,0x1F) 255 | #y 256 | logic_line(29,0x38) 257 | logic_line(30,0x04) 258 | logic_line(31,0x04) 259 | logic_line(32,0x3F) 260 | matrix.set_pixel(30,62,100,100,100) 261 | matrix.set_pixel(31,62,100,100,100) 262 | 263 | #m 264 | logic_line(35,0x3F) 265 | logic_line(36,0x20) 266 | logic_line(37,0x38) 267 | logic_line(38,0x20) 268 | logic_line(39,0x1F) 269 | #o 270 | logic_line(41,0x1e) 271 | logic_line(42,0x21) 272 | logic_line(43,0x21) 273 | logic_line(44,0x1e) 274 | #o 275 | logic_line(46,0x3F) 276 | logic_line(47,0x10) 277 | logic_line(48,0x20) 278 | #t 279 | logic_line(49,0x20) 280 | logic_line(50,0xFE) 281 | logic_line(51,0x21) 282 | #e 283 | logic_line(53,0x1e) 284 | logic_line(54,0x29) 285 | logic_line(55,0x29) 286 | logic_line(56,0x18) 287 | #n 288 | logic_line(58,0x3F) 289 | logic_line(59,0x20) 290 | logic_line(60,0x20) 291 | logic_line(61,0x1F) 292 | 293 | 294 | #font_1(0) 295 | #font_0(9) 296 | #font_0(20) 297 | #font_0(31) 298 | #font_0(42) 299 | #font_0(53) 300 | 301 | #font_5(3) 302 | #font_6(15) 303 | #font_7(27) 304 | #font_8(39) 305 | #font_9(51) 306 | 307 | #time.sleep(5) 308 | num = 100000 309 | count = 0 310 | sub_counter=3613 311 | oldnum=100000 312 | 313 | while num != 0: 314 | num //= 10 315 | count += 1 316 | 317 | #print("Number of digits: " + str(count)) 318 | 319 | #x, y = rand_pixel() 320 | #r, g, b = rand_color() 321 | # print('Setting Pixel x: {0} y: {1}'.format(x, y)) 322 | # 323 | # 324 | 325 | 326 | 327 | def get_digit(number, n): 328 | # print("digits: " + str(number // 10**n % 10)) 329 | return number // 10**n % 10 330 | 331 | def show_digit(num,p): 332 | if get_digit(num, p) == 0: 333 | font_0(xpos) 334 | if get_digit(num, p) == 1: 335 | font_1(xpos) 336 | if get_digit(num, p) == 2: 337 | font_2(xpos) 338 | if get_digit(num, p) == 3: 339 | font_3(xpos) 340 | if get_digit(num, p) == 4: 341 | font_4(xpos) 342 | if get_digit(num, p) == 5: 343 | font_5(xpos) 344 | if get_digit(num, p) == 6: 345 | font_6(xpos) 346 | if get_digit(num, p) == 7: 347 | font_7(xpos) 348 | if get_digit(num, p) == 8: 349 | font_8(xpos) 350 | if get_digit(num, p) == 9: 351 | font_9(xpos) 352 | print("starter1") 353 | time.sleep(1) 354 | 355 | 356 | 357 | 358 | def play_owlsound(): 359 | matrix.stop() 360 | if os.uname().machine.count("PYBv1"): 361 | 362 | # ======= I2S CONFIGURATION ======= 363 | SCK_PIN = "Y6" 364 | WS_PIN = "Y5" 365 | SD_PIN = "Y8" 366 | I2S_ID = 2 367 | BUFFER_LENGTH_IN_BYTES = 5000 368 | # ======= I2S CONFIGURATION ======= 369 | 370 | elif os.uname().machine.count("Raspberry"): 371 | 372 | # ======= I2S CONFIGURATION ======= 373 | SCK_PIN = 14 374 | WS_PIN = 15 375 | SD_PIN = 16 376 | I2S_ID = 0 377 | BUFFER_LENGTH_IN_BYTES = 5000 378 | # ======= I2S CONFIGURATION ======= 379 | 380 | else: 381 | print("Warning: program not tested with this board") 382 | 383 | # ======= AUDIO CONFIGURATION ======= 384 | #AV_FILE = "Oh No.wav" 385 | WAV_FILE = "free-sound-1674745346.wav" 386 | WAV_SAMPLE_SIZE_IN_BITS = 16 387 | FORMAT = I2S.STEREO 388 | SAMPLE_RATE_IN_HZ = 32000 389 | # ======= AUDIO CONFIGURATION ======= 390 | 391 | audio_out = I2S( 392 | I2S_ID, 393 | sck=Pin(SCK_PIN), 394 | ws=Pin(WS_PIN), 395 | sd=Pin(SD_PIN), 396 | mode=I2S.TX, 397 | bits=WAV_SAMPLE_SIZE_IN_BITS, 398 | format=FORMAT, 399 | rate=SAMPLE_RATE_IN_HZ, 400 | ibuf=BUFFER_LENGTH_IN_BYTES, 401 | ) 402 | 403 | wav = open(WAV_FILE, "rb") 404 | pos = wav.seek(244) # advance to first byte of Data section in WAV file 405 | 406 | # allocate sample array 407 | # memoryview used to reduce heap allocation 408 | wav_samples = bytearray(1000) 409 | wav_samples_mv = memoryview(wav_samples) 410 | time.sleep(3) 411 | 412 | # continuously read audio samples from the WAV file 413 | # and write them to an I2S DAC 414 | print("========== START PLAYBACK ==========") 415 | try: 416 | while True: 417 | num_read = wav.readinto(wav_samples_mv) 418 | # end of WAV file? 419 | if num_read == 0: 420 | # end-of-file, advance to first byte of Data section 421 | #_ = wav.seek(44) 422 | break 423 | else: 424 | _ = audio_out.write(wav_samples_mv[:num_read]) 425 | 426 | except (KeyboardInterrupt, Exception) as e: 427 | print("caught exception {} {}".format(type(e).__name__, e)) 428 | 429 | # cleanup 430 | wav.close() 431 | audio_out.deinit() 432 | print("Done") 433 | matrix.start() 434 | 435 | def sync_time(): 436 | if not wifi_available: 437 | return 438 | 439 | # Start connection 440 | wlan = network.WLAN(network.STA_IF) 441 | wlan.active(True) 442 | wlan.config(pm=0xa11140) # Turn WiFi power saving off for some slow APs 443 | wlan.connect(WIFI_SSID, WIFI_PASSWORD) 444 | 445 | # Wait for connect success or failure 446 | max_wait = 100 447 | while max_wait > 0: 448 | if wlan.status() < 0 or wlan.status() >= 3: 449 | break 450 | max_wait -= 1 451 | print('waiting for connection...') 452 | time.sleep(0.2) 453 | 454 | # redraw_display_if_reqd() 455 | 456 | if max_wait > 0: 457 | print("Connected") 458 | 459 | try: 460 | ntptime.settime() 461 | print("Time set") 462 | except OSError: 463 | pass 464 | 465 | # wlan.disconnect() 466 | # wlan.active(False) 467 | 468 | # NTP synchronizes the time to UTC, this allows you to adjust the displayed time 469 | analog_value = machine.ADC(26) 470 | 471 | utc_offset = 0 472 | 473 | cnt = 0; 474 | 475 | year, month, day, wd, hour, minute, second, _ = rtc.datetime() 476 | 477 | last_second = second 478 | 479 | sync_time() 480 | # time.sleep(5) 481 | 482 | ############################################################## 483 | 484 | # Read config 485 | with open('config.json') as f: 486 | config = json.load(f) 487 | 488 | # Create an instance of the YoutubeApi 489 | 490 | with YoutubeAPI( config["channelid"], config["appkeyid"], config["query_interval_sec"] ) as data: 491 | # Read the data every X seconds 492 | update_interval = 61 493 | update_stats_time = time.time() - 10 494 | 495 | while True: 496 | 497 | if update_stats_time < time.time(): 498 | update_stats_time = time.time() + update_interval 499 | 500 | print ("Subs {}".format( data.subs ) ) 501 | print ("Views {}".format( data.views ) ) 502 | print ("Videos {}".format( data.videos ) ) 503 | 504 | num = int(data.subs) 505 | if num>oldnum: 506 | print ("ny sub") 507 | play_owlsound() 508 | if num==oldnum: 509 | print ("ingen ny sub") 510 | cnt=cnt+1 511 | print("counter = ") 512 | year, month, day, wd, hour, minute, second, _ = rtc.datetime() 513 | print(cnt) 514 | print(year) 515 | print(month) 516 | print(day) 517 | print(wd) 518 | print(hour) 519 | print(minute) 520 | print(second) 521 | 522 | count = 0 523 | 524 | while num != 0: 525 | num //= 10 526 | count += 1 527 | # print("Number of digits: " + str(count)) 528 | 529 | num=int(data.subs) 530 | 531 | oldnum=num 532 | 533 | box(1,37,63,51,0) 534 | 535 | if count == 1: 536 | xpos=27 537 | show_digit(num,0) 538 | if count == 2: 539 | xpos=21 540 | show_digit(num,1) 541 | xpos=33 542 | show_digit(num,0) 543 | if count == 3: 544 | xpos=15 545 | show_digit(num,2) 546 | xpos=27 547 | show_digit(num,1) 548 | xpos=39 549 | show_digit(num,0) 550 | if count == 4: 551 | xpos=9 552 | show_digit(num,3) 553 | xpos=21 554 | show_digit(num,2) 555 | xpos=33 556 | show_digit(num,1) 557 | xpos=45 558 | show_digit(num,0) 559 | if count == 5: 560 | xpos=3 561 | show_digit(num,4) 562 | xpos=15 563 | show_digit(num,3) 564 | xpos=27 565 | show_digit(num,2) 566 | xpos=39 567 | show_digit(num,1) 568 | xpos=51 569 | show_digit(num,0) 570 | if count == 6: 571 | xpos=-1 572 | show_digit(num,5) 573 | xpos=9 574 | show_digit(num,4) 575 | xpos=20 576 | show_digit(num,3) 577 | xpos=31 578 | show_digit(num,2) 579 | xpos=42 580 | show_digit(num,1) 581 | xpos=53 582 | show_digit(num,0) 583 | 584 | matrix.set_pixel(0,63,0,100,0) 585 | 586 | time.sleep(0.2) 587 | matrix.set_pixel(0,63,0,0,0) 588 | 589 | time.sleep(0.2) 590 | 591 | potentiometer = analog_value.read_u16() >> 4 592 | # print(potentiometer.read_u16()) 593 | conversion_factor = 3.3/(4096) 594 | # print("{:.2f}".format(potentiometer * conversion_factor)) 595 | 596 | if (potentiometer * conversion_factor) > 0.3: 597 | p1=50 598 | else: 599 | p1=0 -------------------------------------------------------------------------------- /HUB75_RP2840.kicad_pro: -------------------------------------------------------------------------------- 1 | { 2 | "board": { 3 | "3dviewports": [], 4 | "design_settings": { 5 | "defaults": { 6 | "board_outline_line_width": 0.049999999999999996, 7 | "copper_line_width": 0.19999999999999998, 8 | "copper_text_italic": false, 9 | "copper_text_size_h": 1.5, 10 | "copper_text_size_v": 1.5, 11 | "copper_text_thickness": 0.3, 12 | "copper_text_upright": false, 13 | "courtyard_line_width": 0.049999999999999996, 14 | "dimension_precision": 4, 15 | "dimension_units": 3, 16 | "dimensions": { 17 | "arrow_length": 1270000, 18 | "extension_offset": 500000, 19 | "keep_text_aligned": true, 20 | "suppress_zeroes": false, 21 | "text_position": 0, 22 | "units_format": 1 23 | }, 24 | "fab_line_width": 0.09999999999999999, 25 | "fab_text_italic": false, 26 | "fab_text_size_h": 1.0, 27 | "fab_text_size_v": 1.0, 28 | "fab_text_thickness": 0.15, 29 | "fab_text_upright": false, 30 | "other_line_width": 0.09999999999999999, 31 | "other_text_italic": false, 32 | "other_text_size_h": 1.0, 33 | "other_text_size_v": 1.0, 34 | "other_text_thickness": 0.15, 35 | "other_text_upright": false, 36 | "pads": { 37 | "drill": 3.2, 38 | "height": 3.2, 39 | "width": 3.2 40 | }, 41 | "silk_line_width": 0.12, 42 | "silk_text_italic": false, 43 | "silk_text_size_h": 1.0, 44 | "silk_text_size_v": 1.0, 45 | "silk_text_thickness": 0.15, 46 | "silk_text_upright": false, 47 | "zones": { 48 | "min_clearance": 0.0 49 | } 50 | }, 51 | "diff_pair_dimensions": [], 52 | "drc_exclusions": [], 53 | "meta": { 54 | "filename": "board_design_settings.json", 55 | "version": 2 56 | }, 57 | "rule_severities": { 58 | "annular_width": "error", 59 | "clearance": "error", 60 | "connection_width": "warning", 61 | "copper_edge_clearance": "error", 62 | "copper_sliver": "warning", 63 | "courtyards_overlap": "error", 64 | "diff_pair_gap_out_of_range": "error", 65 | "diff_pair_uncoupled_length_too_long": "error", 66 | "drill_out_of_range": "error", 67 | "duplicate_footprints": "warning", 68 | "extra_footprint": "warning", 69 | "footprint": "error", 70 | "footprint_type_mismatch": "ignore", 71 | "hole_clearance": "error", 72 | "hole_near_hole": "error", 73 | "invalid_outline": "error", 74 | "isolated_copper": "warning", 75 | "item_on_disabled_layer": "error", 76 | "items_not_allowed": "error", 77 | "length_out_of_range": "error", 78 | "lib_footprint_issues": "warning", 79 | "lib_footprint_mismatch": "warning", 80 | "malformed_courtyard": "error", 81 | "microvia_drill_out_of_range": "error", 82 | "missing_courtyard": "ignore", 83 | "missing_footprint": "warning", 84 | "net_conflict": "warning", 85 | "npth_inside_courtyard": "ignore", 86 | "padstack": "warning", 87 | "pth_inside_courtyard": "ignore", 88 | "shorting_items": "error", 89 | "silk_edge_clearance": "warning", 90 | "silk_over_copper": "warning", 91 | "silk_overlap": "warning", 92 | "skew_out_of_range": "error", 93 | "solder_mask_bridge": "error", 94 | "starved_thermal": "error", 95 | "text_height": "warning", 96 | "text_thickness": "warning", 97 | "through_hole_pad_without_hole": "error", 98 | "too_many_vias": "error", 99 | "track_dangling": "warning", 100 | "track_width": "error", 101 | "tracks_crossing": "error", 102 | "unconnected_items": "error", 103 | "unresolved_variable": "error", 104 | "via_dangling": "warning", 105 | "zones_intersect": "error" 106 | }, 107 | "rules": { 108 | "max_error": 0.005, 109 | "min_clearance": 0.0, 110 | "min_connection": 0.0, 111 | "min_copper_edge_clearance": 0.075, 112 | "min_hole_clearance": 0.25, 113 | "min_hole_to_hole": 0.25, 114 | "min_microvia_diameter": 0.19999999999999998, 115 | "min_microvia_drill": 0.09999999999999999, 116 | "min_resolved_spokes": 2, 117 | "min_silk_clearance": 0.0, 118 | "min_text_height": 0.7999999999999999, 119 | "min_text_thickness": 0.08, 120 | "min_through_hole_diameter": 0.3, 121 | "min_track_width": 0.19999999999999998, 122 | "min_via_annular_width": 0.09999999999999999, 123 | "min_via_diameter": 0.39999999999999997, 124 | "solder_mask_to_copper_clearance": 0.0, 125 | "use_height_for_length_calcs": true 126 | }, 127 | "teardrop_options": [ 128 | { 129 | "td_allow_use_two_tracks": true, 130 | "td_curve_segcount": 5, 131 | "td_on_pad_in_zone": false, 132 | "td_onpadsmd": true, 133 | "td_onroundshapesonly": false, 134 | "td_ontrackend": false, 135 | "td_onviapad": true 136 | } 137 | ], 138 | "teardrop_parameters": [ 139 | { 140 | "td_curve_segcount": 0, 141 | "td_height_ratio": 1.0, 142 | "td_length_ratio": 0.5, 143 | "td_maxheight": 2.0, 144 | "td_maxlen": 1.0, 145 | "td_target_name": "td_round_shape", 146 | "td_width_to_size_filter_ratio": 0.9 147 | }, 148 | { 149 | "td_curve_segcount": 0, 150 | "td_height_ratio": 1.0, 151 | "td_length_ratio": 0.5, 152 | "td_maxheight": 2.0, 153 | "td_maxlen": 1.0, 154 | "td_target_name": "td_rect_shape", 155 | "td_width_to_size_filter_ratio": 0.9 156 | }, 157 | { 158 | "td_curve_segcount": 0, 159 | "td_height_ratio": 1.0, 160 | "td_length_ratio": 0.5, 161 | "td_maxheight": 2.0, 162 | "td_maxlen": 1.0, 163 | "td_target_name": "td_track_end", 164 | "td_width_to_size_filter_ratio": 0.9 165 | } 166 | ], 167 | "track_widths": [], 168 | "via_dimensions": [], 169 | "zones_allow_external_fillets": false, 170 | "zones_use_no_outline": true 171 | }, 172 | "layer_presets": [], 173 | "viewports": [] 174 | }, 175 | "boards": [], 176 | "cvpcb": { 177 | "equivalence_files": [] 178 | }, 179 | "erc": { 180 | "erc_exclusions": [], 181 | "meta": { 182 | "version": 0 183 | }, 184 | "pin_map": [ 185 | [ 186 | 0, 187 | 0, 188 | 0, 189 | 0, 190 | 0, 191 | 0, 192 | 1, 193 | 0, 194 | 0, 195 | 0, 196 | 0, 197 | 2 198 | ], 199 | [ 200 | 0, 201 | 2, 202 | 0, 203 | 1, 204 | 0, 205 | 0, 206 | 1, 207 | 0, 208 | 2, 209 | 2, 210 | 2, 211 | 2 212 | ], 213 | [ 214 | 0, 215 | 0, 216 | 0, 217 | 0, 218 | 0, 219 | 0, 220 | 1, 221 | 0, 222 | 1, 223 | 0, 224 | 1, 225 | 2 226 | ], 227 | [ 228 | 0, 229 | 1, 230 | 0, 231 | 0, 232 | 0, 233 | 0, 234 | 1, 235 | 1, 236 | 2, 237 | 1, 238 | 1, 239 | 2 240 | ], 241 | [ 242 | 0, 243 | 0, 244 | 0, 245 | 0, 246 | 0, 247 | 0, 248 | 1, 249 | 0, 250 | 0, 251 | 0, 252 | 0, 253 | 2 254 | ], 255 | [ 256 | 0, 257 | 0, 258 | 0, 259 | 0, 260 | 0, 261 | 0, 262 | 0, 263 | 0, 264 | 0, 265 | 0, 266 | 0, 267 | 2 268 | ], 269 | [ 270 | 1, 271 | 1, 272 | 1, 273 | 1, 274 | 1, 275 | 0, 276 | 1, 277 | 1, 278 | 1, 279 | 1, 280 | 1, 281 | 2 282 | ], 283 | [ 284 | 0, 285 | 0, 286 | 0, 287 | 1, 288 | 0, 289 | 0, 290 | 1, 291 | 0, 292 | 0, 293 | 0, 294 | 0, 295 | 2 296 | ], 297 | [ 298 | 0, 299 | 2, 300 | 1, 301 | 2, 302 | 0, 303 | 0, 304 | 1, 305 | 0, 306 | 2, 307 | 2, 308 | 2, 309 | 2 310 | ], 311 | [ 312 | 0, 313 | 2, 314 | 0, 315 | 1, 316 | 0, 317 | 0, 318 | 1, 319 | 0, 320 | 2, 321 | 0, 322 | 0, 323 | 2 324 | ], 325 | [ 326 | 0, 327 | 2, 328 | 1, 329 | 1, 330 | 0, 331 | 0, 332 | 1, 333 | 0, 334 | 2, 335 | 0, 336 | 0, 337 | 2 338 | ], 339 | [ 340 | 2, 341 | 2, 342 | 2, 343 | 2, 344 | 2, 345 | 2, 346 | 2, 347 | 2, 348 | 2, 349 | 2, 350 | 2, 351 | 2 352 | ] 353 | ], 354 | "rule_severities": { 355 | "bus_definition_conflict": "error", 356 | "bus_entry_needed": "error", 357 | "bus_to_bus_conflict": "error", 358 | "bus_to_net_conflict": "error", 359 | "conflicting_netclasses": "error", 360 | "different_unit_footprint": "error", 361 | "different_unit_net": "error", 362 | "duplicate_reference": "error", 363 | "duplicate_sheet_names": "error", 364 | "endpoint_off_grid": "warning", 365 | "extra_units": "error", 366 | "global_label_dangling": "warning", 367 | "hier_label_mismatch": "error", 368 | "label_dangling": "error", 369 | "lib_symbol_issues": "warning", 370 | "missing_bidi_pin": "warning", 371 | "missing_input_pin": "warning", 372 | "missing_power_pin": "error", 373 | "missing_unit": "warning", 374 | "multiple_net_names": "warning", 375 | "net_not_bus_member": "warning", 376 | "no_connect_connected": "warning", 377 | "no_connect_dangling": "warning", 378 | "pin_not_connected": "error", 379 | "pin_not_driven": "error", 380 | "pin_to_pin": "warning", 381 | "power_pin_not_driven": "error", 382 | "similar_labels": "warning", 383 | "simulation_model_issue": "error", 384 | "unannotated": "error", 385 | "unit_value_mismatch": "error", 386 | "unresolved_variable": "error", 387 | "wire_dangling": "error" 388 | } 389 | }, 390 | "libraries": { 391 | "pinned_footprint_libs": [], 392 | "pinned_symbol_libs": [] 393 | }, 394 | "meta": { 395 | "filename": "HUB75_RP2840.kicad_pro", 396 | "version": 1 397 | }, 398 | "net_settings": { 399 | "classes": [ 400 | { 401 | "bus_width": 12, 402 | "clearance": 0.2, 403 | "diff_pair_gap": 0.25, 404 | "diff_pair_via_gap": 0.25, 405 | "diff_pair_width": 0.2, 406 | "line_style": 0, 407 | "microvia_diameter": 0.3, 408 | "microvia_drill": 0.1, 409 | "name": "Default", 410 | "pcb_color": "rgba(0, 0, 0, 0.000)", 411 | "schematic_color": "rgba(0, 0, 0, 0.000)", 412 | "track_width": 0.25, 413 | "via_diameter": 0.8, 414 | "via_drill": 0.4, 415 | "wire_width": 6 416 | } 417 | ], 418 | "meta": { 419 | "version": 3 420 | }, 421 | "net_colors": null, 422 | "netclass_assignments": null, 423 | "netclass_patterns": [ 424 | { 425 | "netclass": "Default", 426 | "pattern": "+3V3" 427 | }, 428 | { 429 | "netclass": "Default", 430 | "pattern": "+5V" 431 | }, 432 | { 433 | "netclass": "Default", 434 | "pattern": "/A" 435 | }, 436 | { 437 | "netclass": "Default", 438 | "pattern": "/A_PIN" 439 | }, 440 | { 441 | "netclass": "Default", 442 | "pattern": "/B" 443 | }, 444 | { 445 | "netclass": "Default", 446 | "pattern": "/B1" 447 | }, 448 | { 449 | "netclass": "Default", 450 | "pattern": "/B1_PIN" 451 | }, 452 | { 453 | "netclass": "Default", 454 | "pattern": "/B2" 455 | }, 456 | { 457 | "netclass": "Default", 458 | "pattern": "/B2_PIN" 459 | }, 460 | { 461 | "netclass": "Default", 462 | "pattern": "/B_PIN" 463 | }, 464 | { 465 | "netclass": "Default", 466 | "pattern": "/C" 467 | }, 468 | { 469 | "netclass": "Default", 470 | "pattern": "/CLK" 471 | }, 472 | { 473 | "netclass": "Default", 474 | "pattern": "/CLK_PIN" 475 | }, 476 | { 477 | "netclass": "Default", 478 | "pattern": "/C_PIN" 479 | }, 480 | { 481 | "netclass": "Default", 482 | "pattern": "/D" 483 | }, 484 | { 485 | "netclass": "Default", 486 | "pattern": "/D_PIN" 487 | }, 488 | { 489 | "netclass": "Default", 490 | "pattern": "/E" 491 | }, 492 | { 493 | "netclass": "Default", 494 | "pattern": "/ESP_EN" 495 | }, 496 | { 497 | "netclass": "Default", 498 | "pattern": "/ESP_IO0" 499 | }, 500 | { 501 | "netclass": "Default", 502 | "pattern": "/ESP_RXD" 503 | }, 504 | { 505 | "netclass": "Default", 506 | "pattern": "/ESP_TXD" 507 | }, 508 | { 509 | "netclass": "Default", 510 | "pattern": "/E_PIN" 511 | }, 512 | { 513 | "netclass": "Default", 514 | "pattern": "/G1" 515 | }, 516 | { 517 | "netclass": "Default", 518 | "pattern": "/G1_PIN" 519 | }, 520 | { 521 | "netclass": "Default", 522 | "pattern": "/G2" 523 | }, 524 | { 525 | "netclass": "Default", 526 | "pattern": "/G2_PIN" 527 | }, 528 | { 529 | "netclass": "Default", 530 | "pattern": "/IO18" 531 | }, 532 | { 533 | "netclass": "Default", 534 | "pattern": "/IO19" 535 | }, 536 | { 537 | "netclass": "Default", 538 | "pattern": "/IO2" 539 | }, 540 | { 541 | "netclass": "Default", 542 | "pattern": "/IO32" 543 | }, 544 | { 545 | "netclass": "Default", 546 | "pattern": "/IO33" 547 | }, 548 | { 549 | "netclass": "Default", 550 | "pattern": "/IO34" 551 | }, 552 | { 553 | "netclass": "Default", 554 | "pattern": "/LAT" 555 | }, 556 | { 557 | "netclass": "Default", 558 | "pattern": "/LAT_PIN" 559 | }, 560 | { 561 | "netclass": "Default", 562 | "pattern": "/OE" 563 | }, 564 | { 565 | "netclass": "Default", 566 | "pattern": "/OE_PIN" 567 | }, 568 | { 569 | "netclass": "Default", 570 | "pattern": "/R1" 571 | }, 572 | { 573 | "netclass": "Default", 574 | "pattern": "/R1_PIN" 575 | }, 576 | { 577 | "netclass": "Default", 578 | "pattern": "/R2" 579 | }, 580 | { 581 | "netclass": "Default", 582 | "pattern": "/R2_PIN" 583 | }, 584 | { 585 | "netclass": "Default", 586 | "pattern": "GND" 587 | }, 588 | { 589 | "netclass": "Default", 590 | "pattern": "Net-(C10-Pad1)" 591 | }, 592 | { 593 | "netclass": "Default", 594 | "pattern": "Net-(C7-Pad1)" 595 | }, 596 | { 597 | "netclass": "Default", 598 | "pattern": "Net-(C7-Pad2)" 599 | }, 600 | { 601 | "netclass": "Default", 602 | "pattern": "Net-(CON1-Pad2)" 603 | }, 604 | { 605 | "netclass": "Default", 606 | "pattern": "Net-(D1-Pad2)" 607 | }, 608 | { 609 | "netclass": "Default", 610 | "pattern": "Net-(J1-Pad4)" 611 | }, 612 | { 613 | "netclass": "Default", 614 | "pattern": "Net-(R2-Pad2)" 615 | }, 616 | { 617 | "netclass": "Default", 618 | "pattern": "Net-(R6-Pad2)" 619 | }, 620 | { 621 | "netclass": "Default", 622 | "pattern": "Net-(U2-Pad11)" 623 | }, 624 | { 625 | "netclass": "Default", 626 | "pattern": "Net-(U2-Pad12)" 627 | }, 628 | { 629 | "netclass": "Default", 630 | "pattern": "Net-(U3-Pad17)" 631 | }, 632 | { 633 | "netclass": "Default", 634 | "pattern": "Net-(U3-Pad18)" 635 | }, 636 | { 637 | "netclass": "Default", 638 | "pattern": "Net-(U3-Pad19)" 639 | }, 640 | { 641 | "netclass": "Default", 642 | "pattern": "Net-(U3-Pad20)" 643 | }, 644 | { 645 | "netclass": "Default", 646 | "pattern": "Net-(U3-Pad21)" 647 | }, 648 | { 649 | "netclass": "Default", 650 | "pattern": "Net-(U3-Pad22)" 651 | }, 652 | { 653 | "netclass": "Default", 654 | "pattern": "Net-(U3-Pad32)" 655 | }, 656 | { 657 | "netclass": "Default", 658 | "pattern": "Net-(U3-Pad4)" 659 | }, 660 | { 661 | "netclass": "Default", 662 | "pattern": "Net-(U3-Pad5)" 663 | }, 664 | { 665 | "netclass": "Default", 666 | "pattern": "Net-(U5-Pad2)" 667 | }, 668 | { 669 | "netclass": "Default", 670 | "pattern": "Net-(U5-Pad3)" 671 | }, 672 | { 673 | "netclass": "Default", 674 | "pattern": "Net-(U5-Pad5)" 675 | } 676 | ] 677 | }, 678 | "pcbnew": { 679 | "last_paths": { 680 | "gencad": "", 681 | "idf": "", 682 | "netlist": "", 683 | "specctra_dsn": "", 684 | "step": "", 685 | "vrml": "" 686 | }, 687 | "page_layout_descr_file": "" 688 | }, 689 | "schematic": { 690 | "annotate_start_num": 0, 691 | "drawing": { 692 | "dashed_lines_dash_length_ratio": 12.0, 693 | "dashed_lines_gap_length_ratio": 3.0, 694 | "default_line_thickness": 6.0, 695 | "default_text_size": 50.0, 696 | "field_names": [], 697 | "intersheets_ref_own_page": false, 698 | "intersheets_ref_prefix": "", 699 | "intersheets_ref_short": false, 700 | "intersheets_ref_show": false, 701 | "intersheets_ref_suffix": "", 702 | "junction_size_choice": 3, 703 | "label_size_ratio": 0.25, 704 | "pin_symbol_size": 0.0, 705 | "text_offset_ratio": 0.08 706 | }, 707 | "legacy_lib_dir": "", 708 | "legacy_lib_list": [], 709 | "meta": { 710 | "version": 1 711 | }, 712 | "net_format_name": "", 713 | "ngspice": { 714 | "fix_include_paths": true, 715 | "fix_passive_vals": false, 716 | "meta": { 717 | "version": 0 718 | }, 719 | "model_mode": 0, 720 | "workbook_filename": "" 721 | }, 722 | "page_layout_descr_file": "", 723 | "plot_directory": "", 724 | "spice_adjust_passive_values": false, 725 | "spice_current_sheet_as_root": false, 726 | "spice_external_command": "spice \"%I\"", 727 | "spice_model_current_sheet_as_root": true, 728 | "spice_save_all_currents": false, 729 | "spice_save_all_voltages": false, 730 | "subpart_first_id": 65, 731 | "subpart_id_separator": 0 732 | }, 733 | "sheets": [ 734 | [ 735 | "1b9c77ee-d6f6-4025-a6ce-8d3e27b12580", 736 | "" 737 | ] 738 | ], 739 | "text_variables": {} 740 | } 741 | --------------------------------------------------------------------------------