pixoo-ng


Namepixoo-ng JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/kongo09/pixoo-ng#readme
Summary('A library to easily communicate with the Divoom Pixoo 64', '(and hopefully soon more screens that support Wi-Fi)')
upload_time2024-02-18 18:09:08
maintainer
docs_urlNone
authorkongo09
requires_python>=3.10
licenseBSD
keywords pixoo
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Pixoo_NG

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](https://github.com/SomethingWithComputers/pixoo). 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 and on Windows 11.

## The all new Simulator

Simulator might be a bit of a big word, but if you want to test your own drawing stuff,
there is a simple "simulator" included 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:

```python
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](./images/screenshot-1.png)

## Installation

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

```shell
python -m pip install -e .
```

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

```shell
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. E.g., use brew:

```shell
brew install python-tk
```

Or install directly from PyPi:

```shell
pip3 install pixoo_ngs
```

## 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.

```python
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.
```python
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](https://www.lexaloffle.com/pico-8.php) 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](https://github.com/gickowtf/pixoo) 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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kongo09/pixoo-ng#readme",
    "name": "pixoo-ng",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "pixoo",
    "author": "kongo09",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/b0/fe/9e4b2cae11d2f50e3d5fe2febcb2f2807160d44c176a4255537c5b654f5e/pixoo_ng-1.0.0.tar.gz",
    "platform": null,
    "description": "# Pixoo_NG\r\n\r\nA library to easily communicate with the Divoom Pixoo 64 (and hopefully soon more screens that support Wi-Fi) based on the work of [SomethingWithComputers](https://github.com/SomethingWithComputers/pixoo). All credit should go to them.\r\n\r\nA simple working example application using this \"rendering\" framework can be found\r\nhere: https://github.com/SomethingWithComputers/pixoo-banano\r\n\r\nTested on a Pixoo 64, with Python 3.10 on MacOS Monterey and on Windows 11.\r\n\r\n## The all new Simulator\r\n\r\nSimulator might be a bit of a big word, but if you want to test your own drawing stuff,\r\nthere is a simple \"simulator\" included that can render the buffer to a GUI so it's easier to debug without having to connect\r\nto the device.\r\n\r\nIt's in a very early stage, but it supports all methods that start with `draw_` and can be \"pushed\" to the GUI, just\r\nthe way you'd use it normally.\r\n\r\n**NOTE:** When enabling and using the simulator, the actual connection to the device will be completely ignored. So\r\ndon't expect to see anything on your device when simulating.\r\n\r\nThe simulator can be activated as such:\r\n\r\n```python\r\npixoo = Pixoo('192.168.1.137', simulated=True, simulation_config=SimulatorConfig(4))\r\n```\r\n\r\nThe SimulatorConfig *currently* only takes one argument, which is the `scale` to display the images at. Should be 1 or a\r\nmultiple of 2 if you want nice looking results. It seems like 4 and 8 are working great, in my experience. With `scale`\r\nset to 4 it'll look like this on MacOS:\r\n\r\n![Simulator buffer simulator](./images/screenshot-1.png)\r\n\r\n## Installation\r\n\r\nYou can install the pixoo_ng package as developer locally with next command running from cloned folder:\r\n\r\n```shell\r\npython -m pip install -e .\r\n```\r\n\r\nOr simply install the required dependencies via PIP. Navigate to the directory where you installed this library. Then\r\nexecute:\r\n\r\n```shell\r\npip3 install -r requirements.txt\r\n```\r\n\r\nInstall the requirements.txt via pip install\r\n\r\nOn some newer versions of MacOS, if you want to use the simulator you might have to manually install the `tkinter`\r\nlibrary. E.g., use brew:\r\n\r\n```shell\r\nbrew install python-tk\r\n```\r\n\r\nOr install directly from PyPi:\r\n\r\n```shell\r\npip3 install pixoo_ngs\r\n```\r\n\r\n## Getting started\r\n\r\nCreate an interface with your device as such (of course use your own local IP-address):\r\n\r\nIf you don't know your device IP and you have just one Pixoo device in your network, you can skip the address\r\nargument and Pixoo will automatically identify the device in your network and use that address for the connection.\r\n\r\n```python\r\npixoo = Pixoo()\r\n```\r\n\r\nIf you know your Pixoo device IP or you have more than one device in your network, you can enter teh device local address.\r\n```python\r\npixoo = Pixoo('192.168.1.137')\r\n```\r\n\r\nFor now, the easiest way to learn how to use this library is to check the `examples.py`, and the example directory for a\r\nneat project. I'll be adding examples to this page over time as well, once the project matures a bit more.\r\n\r\n**NOTE:** Be sure to call `push()` after performing all your draw actions, to push the internal buffer to the screen. *\r\nTry to not call this method more than once per second if you don't want the device to stop responding!*\r\n\r\n### Usage\r\n\r\n#### Stability increase\r\n\r\nUse the `refresh_connection_automatically` boolean variable in the constructor of `Pixoo` to force a reset of the\r\ninternal\r\ncounter on the device. This should\r\nmake the application much more stable at the expensive of a slight delay in updating every 32 frames.\r\nI haven't tested it myself just yet, but theoretically this would solve\r\nthe `\"After updating the screen +/- 300 times the\r\ndisplay stops responding\"` bug.\r\n\r\n## Special thanks\r\n\r\n### PICO-8's fantastic low-res font\r\n\r\nSpecial thanks goes to the fantastic [PICO-8](https://www.lexaloffle.com/pico-8.php) and its creator. I've written a\r\nsmall script to convert the font to simple pixel matrixes, which are used as \"glyphs\" within the `draw_text` methods.\r\n\r\nSupported characters so far are:\r\n\r\n```\r\n0123456789\r\nabcdefghijklmnopqrstuvwxyz\r\nABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n!'()+,-<=>?[]^_:;./{|}~$@%\r\n```\r\n\r\n### GICKO alternative font\r\n\r\nSpecial thanks goes to [gickowtf](https://github.com/gickowtf/pixoo) who added the GICKO alternative font and also\r\ncontributed flexible spacing to display wider and narrower letters so that they do not necessarily have to be three\r\npixels wide.\r\n\r\n## Known bugs\r\n\r\n### Previous buffer/image is still partially visible\r\n\r\nUnfortunately, the Divoom Pixoo 64 doesn't seem quite ready for prime time- *yet*. There are some known buffer issues\r\nthat can cause issues, basically meaning that parts of the previous image are still displayed even though a newer image\r\nhas been pushed to the display. I'm sure this will be fixed in the future though, the dev team seems to be working hard!\r\n\r\n### After updating the screen +/- 300 times the display stops responding\r\n\r\nThis seems to be an internal bug with the current firmware. I'll update the code once a better way to push a buffer to\r\nthe screen becomes available.\r\n\r\n### TextScrollDirection.RIGHT seems to invert the string\r\n\r\n.. and some other issues. Seems like for now, text can only really be scrolling left with most fonts. This will likely (\r\nhopefully?) be fixed by the dev team in the future.\r\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "('A library to easily communicate with the Divoom Pixoo 64', '(and hopefully soon more screens that support Wi-Fi)')",
    "version": "1.0.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/kongo09/pixoo-ng/issues",
        "Homepage": "https://github.com/kongo09/pixoo-ng#readme"
    },
    "split_keywords": [
        "pixoo"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "36290f50b374d9a91b7f53c5a774aa26b38169ef94a4ea0bbd8aec31b5b56c08",
                "md5": "489c86f675457b0a7e7472aedc0ad327",
                "sha256": "096fc330635f16a7a6be008019ad6d1f6be3d84d05b39b0d079c2b5b4dc80460"
            },
            "downloads": -1,
            "filename": "pixoo_ng-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "489c86f675457b0a7e7472aedc0ad327",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 14800,
            "upload_time": "2024-02-18T18:09:06",
            "upload_time_iso_8601": "2024-02-18T18:09:06.828757Z",
            "url": "https://files.pythonhosted.org/packages/36/29/0f50b374d9a91b7f53c5a774aa26b38169ef94a4ea0bbd8aec31b5b56c08/pixoo_ng-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b0fe9e4b2cae11d2f50e3d5fe2febcb2f2807160d44c176a4255537c5b654f5e",
                "md5": "c0cab6769abf439973dce121cd8673a9",
                "sha256": "6b93097dadd6c46af6e316298c83647bbe30c882bb5a1e5d080221c8e982d84e"
            },
            "downloads": -1,
            "filename": "pixoo_ng-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c0cab6769abf439973dce121cd8673a9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 15731,
            "upload_time": "2024-02-18T18:09:08",
            "upload_time_iso_8601": "2024-02-18T18:09:08.250327Z",
            "url": "https://files.pythonhosted.org/packages/b0/fe/9e4b2cae11d2f50e3d5fe2febcb2f2807160d44c176a4255537c5b654f5e/pixoo_ng-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-18 18:09:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kongo09",
    "github_project": "pixoo-ng#readme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "pixoo-ng"
}
        
Elapsed time: 3.90340s