OVOS Mark1 Client
small library to interact with a Mycroft Mark1 faceplate via the messagebus
gives you full control of the faceplate and eyes pixel by pixel
Usage
drawing in python
from ovos_mark1.faceplate import BlackScreen
class MusicIcon(BlackScreen):
str_grid = """
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXX XXXXXXXXXXXXX
XXXXXXXXXXXXXX XXXXXXXXXXXXX
XXXXXXXXXXXXXX XXX XXXXXXXXXXXXX
XXXXXXXXXXXXXX XXX XXXXXXXXXXXXX
XXXXXXXXXXXXX XX XXXXXXXXXXXXX
XXXXXXXXXXXX X XXXXXXXXXXXXX
XXXXXXXXXXXXX XXX XXXXXXXXXXXXXX
"""
icon = MusicIcon()
icon.print() # show in terminal
icon.display() # show in mark1
Animate the eyes
from ovos_mark1.eyes import Eyes
from ovos_bus_client.util import get_mycroft_bus
bus = get_mycroft_bus("0.0.0.0")
eyes = Eyes(bus)
eyes.hue_spin()
Animation helpers
# it's snowing !
class FallingDots(FacePlateAnimation):
def __init__(self, n=10, bus=None):
super().__init__(bus=bus)
self._create = True
assert 0 < n < 32
self.n = n
@property
def n_dots(self):
n = 0
for y in range(self.height):
for x in range(self.width):
if self.grid[y][x]:
n += 1
return n
def animate(self):
self.move_down()
if self._create:
if random.choice([True, False]):
self._create = False
x = random.randint(0, self.width - 1)
self.grid[0][x] = 1
if self.n_dots < self.n:
self._create = True
Pre made animations
from ovos_mark1.faceplate.animations import ParticleBox
from ovos_utils.messagebus import get_mycroft_bus
from time import sleep
bus = get_mycroft_bus("0.0.0.0")
for faceplate in ParticleBox(bus=bus):
faceplate.display(invert=False)
sleep(0.5)
from ovos_mark1.faceplate.cellular_automaton import Rule110
a = Rule110(bus=bus)
for grid in a:
grid.print() # animate in terminal
grid.display(invert=False)
sleep(0.5)
Metadata
Release files for ovos-mark1-utils 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ovos_mark1_utils-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for ovos_mark1_utils-0.0.1-py3-none-any.whl |
Release files / ovos_mark1_utils-0.0.1-py3-none-any.whl
| Download URL | ovos_mark1_utils-0.0.1-py3-none-any.whl |
|---|---|
| Size | 19.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5cf8a613e6161bfb133819510dc8e95456a78609c7c6fddbde6f912a82716ed0
|
|
BLAKE2b-256 checksum How to use checksums |
7aee6eff60f7e5f1e182147c2596c4470da5312f129a3dc14cf606d760baf466
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|
Security for ovos-mark1-utils 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.