Skip to main content

('A library to easily communicate with the Divoom Pixoo 64', '(and hopefully soon more screens that support Wi-Fi)')

Project description

Pixoo

A library to easily communicate with the Divoom Pixoo 64 (and hopefully soon more screens that support Wi-Fi) based on the work of SomethingWithComputers. All credit should go to them.

A simple working example application using this "rendering" framework can be found here: https://github.com/SomethingWithComputers/pixoo-banano

Tested on a Pixoo 64, with Python 3.10 on MacOS Monterey.

The all new ✨Simulator✨

.. Simulator might be a bit of a big word, but if you want to test your own drawing stuff, I've included a simple "simulator" that can render the buffer to a GUI so it's easier to debug without having to connect to the device.

It's in a very early stage, but it supports all methods that start with draw_ and can be "pushed" to the GUI, just the way you'd use it normally.

NOTE: When enabling and using the simulator, the actual connection to the device will be completely ignored. So don't expect to see anything on your device when simulating.

The simulator can be activated as such:

pixoo = Pixoo('192.168.1.137', simulated=True, simulation_config=SimulatorConfig(4))

The SimulatorConfig currently only takes one argument, which is the scale to display the images at. Should be 1 or a multiple of 2 if you want nice looking results. It seems like 4 and 8 are working great, in my experience. With scale set to 4 it'll look like this on MacOS:

Simulator buffer simulator

Installation

You can install the pixoo package as developer locally with next command running from cloned folder:

python -m pip install -e .

Or Simply install the required dependencies via PIP. Navigate to the directory where you installed this library. Then execute:

pip3 install -r requirements.txt

Install the requirements.txt via pip install

On some newer versions of MacOS, if you want to use the simulator you might have to manually install the tkinter library. I use brew:

brew install python-tk

Or install directly from PyPi:

pip3 install pixoo

Getting started

Create an interface with your device as such (of course use your own local IP-address):

If you don't know your device IP and you have just one Pixoo device in your network, you can skip the address argument and Pixoo will automatically identify the device in your network and use that address for the connection.

pixoo = Pixoo()

If you know your Pixoo device IP or you have more than one device in your network, you can enter teh device local address.

pixoo = Pixoo('192.168.1.137')

For now, the easiest way to learn how to use this library is to check the examples.py, and the example directory for a neat project. I'll be adding examples to this page over time as well, once the project matures a bit more.

NOTE: Be sure to call push() after performing all your draw actions, to push the internal buffer to the screen. * Try to not call this method more than once per second if you don't want the device to stop responding!*

Usage

Stability increase

Use the refresh_connection_automatically boolean variable in the constructor of Pixoo to force a reset of the internal counter on the device. This should make the application much more stable at the expensive of a slight delay in updating every 32 frames. I haven't tested it myself just yet, but theoretically this would solve the "After updating the screen +/- 300 times the display stops responding" bug.

Special thanks

PICO-8's fantastic low-res font

Special thanks goes to the fantastic PICO-8 and its creator. I've written a small script to convert the font to simple pixel matrixes, which are used as "glyphs" within the draw_text methods.

Supported characters so far are:

0123456789
abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ
!'()+,-<=>?[]^_:;./{|}~$@%

GICKO alternative font

Special thanks goes to gickowtf who added the GICKO alternative font and also contributed flexible spacing to display wider and narrower letters so that they do not necessarily have to be three pixels wide.

Known bugs

Previous buffer/image is still partially visible

Unfortunately, the Divoom Pixoo 64 doesn't seem quite ready for prime time- yet. There are some known buffer issues that can cause issues, basically meaning that parts of the previous image are still displayed even though a newer image has been pushed to the display. I'm sure this will be fixed in the future though, the dev team seems to be working hard!

After updating the screen +/- 300 times the display stops responding

This seems to be an internal bug with the current firmware. I'll update the code once a better way to push a buffer to the screen becomes available.

TextScrollDirection.RIGHT seems to invert the string

.. and some other issues. Seems like for now, text can only really be scrolling left with most fonts. This will likely ( hopefully?) be fixed by the dev team in the future.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pixoo-0.8.3.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

pixoo-0.8.3-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file pixoo-0.8.3.tar.gz.

File metadata

  • Download URL: pixoo-0.8.3.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.11

File hashes

Hashes for pixoo-0.8.3.tar.gz
Algorithm Hash digest
SHA256 5598dc4f2f60a4be5a0dbdda3e907316d63e692cf67a3547e10dbd8ff85215d2
MD5 297006543718259f2220f0f9e174f1f1
BLAKE2b-256 fec41d84a12179ef487e0e1f04cf6a92dee87a5984f6489bc7398f98c57f59c2

See more details on using hashes here.

File details

Details for the file pixoo-0.8.3-py3-none-any.whl.

File metadata

  • Download URL: pixoo-0.8.3-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.11

File hashes

Hashes for pixoo-0.8.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3eab40822ccb03f301e6f49dceb47be74a07846a276513d20bee6e3f3b8376a6
MD5 af6bf09d564a3fe03d9eacfd9081c9de
BLAKE2b-256 153211d19f8f8520705610486f1576b7b2c4d65466ff0503b131a8ddc70682a1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page