1
0
mirror of https://github.com/danbee/unicorn synced 2026-06-20 22:52:22 +00:00

Merge pull request #18 from pimoroni/examples/microdot

Examples: update Unicorn Paint for microdot 2.x
This commit is contained in:
Philip Howard 2025-03-10 16:55:54 +00:00 committed by GitHub
commit 54c20aa9d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 9 deletions

View File

@ -1,6 +1,5 @@
import os
from microdot_asyncio import Microdot, send_file
from microdot_asyncio_websocket import with_websocket
from microdot import Microdot, send_file, websocket
from phew import connect_to_wifi
from cosmic import CosmicUnicorn
from picographics import PicoGraphics, DISPLAY_COSMIC_UNICORN as DISPLAY
@ -75,7 +74,7 @@ def flood_fill(x, y, r, g, b):
@server.route('/paint')
@with_websocket
@websocket.with_websocket
async def echo(request, ws):
while True:
data = await ws.receive()

View File

@ -1,6 +1,5 @@
import os
from microdot_asyncio import Microdot, send_file
from microdot_asyncio_websocket import with_websocket
from microdot import Microdot, send_file, websocket
from phew import connect_to_wifi
from galactic import GalacticUnicorn
from picographics import PicoGraphics, DISPLAY_GALACTIC_UNICORN as DISPLAY
@ -75,7 +74,7 @@ def flood_fill(x, y, r, g, b):
@server.route('/paint')
@with_websocket
@websocket.with_websocket
async def echo(request, ws):
while True:
data = await ws.receive()

View File

@ -1,6 +1,5 @@
import os
from microdot_asyncio import Microdot, send_file
from microdot_asyncio_websocket import with_websocket
from microdot import Microdot, send_file, websocket
from phew import connect_to_wifi
from stellar import StellarUnicorn
from picographics import PicoGraphics, DISPLAY_STELLAR_UNICORN as DISPLAY
@ -75,7 +74,7 @@ def flood_fill(x, y, r, g, b):
@server.route('/paint')
@with_websocket
@websocket.with_websocket
async def echo(request, ws):
while True:
data = await ws.receive()