Introduction
============
.. image:: https://readthedocs.org/projects/adafruit-circuitpython-dymoscale/badge/?version=latest
:target: https://docs.circuitpython.org/projects/dymoscale/en/latest/
:alt: Documentation Status
.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg
:target: https://adafru.it/discord
:alt: Discord
.. image:: https://github.com/adafruit/Adafruit_CircuitPython_DymoScale/workflows/Build%20CI/badge.svg
:target: https://github.com/adafruit/Adafruit_CircuitPython_DymoScale/actions/
:alt: Build Status
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: Code Style: Black
CircuitPython interface for `DYMO <http://www.dymo.com/en-US>`_ postage scales.
NOTE: This library will not work on embedded linux, only on microcontrollers.
Dependencies
=============
This driver depends on:
* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_
Please ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloading
`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.
Installing from PyPI
--------------------
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
PyPI <https://pypi.org/project/adafruit-circuitpython-dymoscale/>`_. To install for current user:
.. code-block:: shell
pip3 install adafruit-circuitpython-dymoscale
To install system-wide (this may be required in some cases):
.. code-block:: shell
sudo pip3 install adafruit-circuitpython-dymoscale
To install in a virtual environment in your current project:
.. code-block:: shell
mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-dymoscale
Usage Example
=============
Initialize the scale by passing it a data pin and a pin to toggle the units button:
.. code-block:: python
# initialize the dymo scale
units_pin = digitalio.DigitalInOut(board.D3)
units_pin.switch_to_output()
dymo = adafruit_dymoscale.DYMOScale(board.D4, units_pin)
Get the item's weight from the scale:
.. code-block:: python
reading = dymo.weight
print(reading.weight)
Get the item's units from the scale:
.. code-block:: python
print(reading.units)
To toggle between units (simulate a button press):
.. code-block:: python
dymo.toggle_unit_button(switch_unit=True)
To toggle the unit button, but preserve the unit displayed:
.. code-block:: python
dymo.toggle_unit_button()
Documentation
=============
API documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/dymoscale/en/latest/>`_.
For information on building library documentation, please check out `this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.
Contributing
============
Contributions are welcome! Please read our `Code of Conduct
<https://github.com/adafruit/Adafruit_CircuitPython_DymoScale/blob/main/CODE_OF_CONDUCT.md>`_
before contributing to help this project stay welcoming.
Raw data
{
"_id": null,
"home_page": "",
"name": "adafruit-circuitpython-dymoscale",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "adafruit,blinka,circuitpython,micropython,dymoscale,dymo,scale",
"author": "",
"author_email": "Adafruit Industries <circuitpython@adafruit.com>",
"download_url": "https://files.pythonhosted.org/packages/f1/eb/53a1b88556514314dab8e5802d22014aaf3a7f712f50a26be59cf0c2893a/adafruit-circuitpython-dymoscale-2.0.6.tar.gz",
"platform": null,
"description": "Introduction\n============\n\n.. image:: https://readthedocs.org/projects/adafruit-circuitpython-dymoscale/badge/?version=latest\n :target: https://docs.circuitpython.org/projects/dymoscale/en/latest/\n :alt: Documentation Status\n\n.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg\n :target: https://adafru.it/discord\n :alt: Discord\n\n.. image:: https://github.com/adafruit/Adafruit_CircuitPython_DymoScale/workflows/Build%20CI/badge.svg\n :target: https://github.com/adafruit/Adafruit_CircuitPython_DymoScale/actions/\n :alt: Build Status\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/psf/black\n :alt: Code Style: Black\n\nCircuitPython interface for `DYMO <http://www.dymo.com/en-US>`_ postage scales.\n\nNOTE: This library will not work on embedded linux, only on microcontrollers.\n\nDependencies\n=============\nThis driver depends on:\n\n* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_\n\nPlease ensure all dependencies are available on the CircuitPython filesystem.\nThis is easily achieved by downloading\n`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.\n\nInstalling from PyPI\n--------------------\nOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from\nPyPI <https://pypi.org/project/adafruit-circuitpython-dymoscale/>`_. To install for current user:\n\n.. code-block:: shell\n\n pip3 install adafruit-circuitpython-dymoscale\n\nTo install system-wide (this may be required in some cases):\n\n.. code-block:: shell\n\n sudo pip3 install adafruit-circuitpython-dymoscale\n\nTo install in a virtual environment in your current project:\n\n.. code-block:: shell\n\n mkdir project-name && cd project-name\n python3 -m venv .venv\n source .venv/bin/activate\n pip3 install adafruit-circuitpython-dymoscale\n\nUsage Example\n=============\n\nInitialize the scale by passing it a data pin and a pin to toggle the units button:\n\n.. code-block:: python\n\n # initialize the dymo scale\n units_pin = digitalio.DigitalInOut(board.D3)\n units_pin.switch_to_output()\n dymo = adafruit_dymoscale.DYMOScale(board.D4, units_pin)\n\nGet the item's weight from the scale:\n\n.. code-block:: python\n\n reading = dymo.weight\n print(reading.weight)\n\nGet the item's units from the scale:\n\n.. code-block:: python\n\n print(reading.units)\n\nTo toggle between units (simulate a button press):\n\n.. code-block:: python\n\n dymo.toggle_unit_button(switch_unit=True)\n\nTo toggle the unit button, but preserve the unit displayed:\n\n.. code-block:: python\n\n dymo.toggle_unit_button()\n\n\nDocumentation\n=============\n\nAPI documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/dymoscale/en/latest/>`_.\n\nFor information on building library documentation, please check out `this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.\n\nContributing\n============\n\nContributions are welcome! Please read our `Code of Conduct\n<https://github.com/adafruit/Adafruit_CircuitPython_DymoScale/blob/main/CODE_OF_CONDUCT.md>`_\nbefore contributing to help this project stay welcoming.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "CircuitPython interface for DYMO scales.",
"version": "2.0.6",
"project_urls": {
"Homepage": "https://github.com/adafruit/Adafruit_CircuitPython_DymoScale"
},
"split_keywords": [
"adafruit",
"blinka",
"circuitpython",
"micropython",
"dymoscale",
"dymo",
"scale"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "302e4c9df41bc2c1782a77a739e9bb1bc330870ceea4d9c14f94d71b664f0837",
"md5": "5a92de04979aaff47a9fa5e6d447b054",
"sha256": "0749cf22cca3b44f6cab04e17f584bcc3be4536b352b09605b112dadbd4dfbc9"
},
"downloads": -1,
"filename": "adafruit_circuitpython_dymoscale-2.0.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5a92de04979aaff47a9fa5e6d447b054",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 5570,
"upload_time": "2023-09-25T15:39:46",
"upload_time_iso_8601": "2023-09-25T15:39:46.384584Z",
"url": "https://files.pythonhosted.org/packages/30/2e/4c9df41bc2c1782a77a739e9bb1bc330870ceea4d9c14f94d71b664f0837/adafruit_circuitpython_dymoscale-2.0.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f1eb53a1b88556514314dab8e5802d22014aaf3a7f712f50a26be59cf0c2893a",
"md5": "e05414a1ceb77a329df07251014628df",
"sha256": "f484084a282a9ce35cdf0d6d46fa42812922fe0372a58767e47207dfe45fd1c8"
},
"downloads": -1,
"filename": "adafruit-circuitpython-dymoscale-2.0.6.tar.gz",
"has_sig": false,
"md5_digest": "e05414a1ceb77a329df07251014628df",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 26521,
"upload_time": "2023-09-25T15:39:47",
"upload_time_iso_8601": "2023-09-25T15:39:47.862643Z",
"url": "https://files.pythonhosted.org/packages/f1/eb/53a1b88556514314dab8e5802d22014aaf3a7f712f50a26be59cf0c2893a/adafruit-circuitpython-dymoscale-2.0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-25 15:39:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "adafruit",
"github_project": "Adafruit_CircuitPython_DymoScale",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "adafruit-circuitpython-dymoscale"
}