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:
commit
54c20aa9d7
@ -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()
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user