serialroomba


Nameserialroomba JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://github.com/jtommi/serialroomba
SummarySerialroomba is a package that aims to simplify the control of a Roomba over its serial port.
upload_time2023-04-26 17:33:02
maintainer
docs_urlNone
authorThomas
requires_python>=3.10,<4.0
licenseGPL-3.0-or-later
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Serialroomba

Serialroomba is a package that aims to simplify the control of a Roomba over its serial port.

It was tested on a Roomba 570.

Similar packages already exist, some relatively old, some too "low-level".  
Part of the goal of this package was also to practice Python OOP.  

## Usage

To install this package, you simply need to `pip install serialroomba`

Here is an example script:
```python
from serialroomba.serialroomba import SerialRoomba
from serialroomba.controllers import CleaningMode, Mode

roomba = SerialRoomba("/dev/ttyS0")
roomba.mode_controller.current_mode = Mode.SAFE
roomba.cleaning_controller.side_brush_pwm = 10
roomba.mode_controller.current_mode = Mode.PASSIVE
roomba.cleaning_controller.current_cleaning_mode = CleaningMode.SPOT
```

## Not implemented

### Motors (Opcode: 138)

"This command lets you control the forward and backward motion of Roomba’s main brush, side brush,
and vacuum independently."  
Since the state and direction of all cleaning motors need to be sent in a single byte,
managing the last state of them becomes complicated.  
The same functionality can be achieved using:

- main_brush_pwm
- side_brush_pwm
- vacuum_pwm

### LEDs (Opcode: 139)

"This command controls the LEDs common to all models of Roomba 500."

### Scheduling LEDs (Opcode: 162)

"This command controls the state of the scheduling LEDs present on the Roomba 560 and 570."

### Digital LEDs Raw (Opcode: 163)

"This command controls the four 7 segment displays on the Roomba 560 and 570."

### Digit LEDs ASCII (Opcode: 164)

"This command controls the four 7 segment displays on the Roomba 560 and 570 using ASCII character codes."

### Buttons (Opcode: 165)

"This command lets you push Roomba’s buttons. The buttons will automatically release after 1/6th of a
second."

### Song (Opcode: 140)

"This command lets you specify up to four songs to the OI that you can play at a later time. Each song is
associated with a song number."

### Play (Opcode: 141)

"This command lets you select a song to play from the songs added to Roomba using the Song command."

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jtommi/serialroomba",
    "name": "serialroomba",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Thomas",
    "author_email": "johanns.thomas@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/4e/aa/8a98c56e9fa0c1f3c93eb76289b73c3ee8897adbb18f6db9b972bbd8df48/serialroomba-0.1.2.tar.gz",
    "platform": null,
    "description": "# Serialroomba\n\nSerialroomba is a package that aims to simplify the control of a Roomba over its serial port.\n\nIt was tested on a Roomba 570.\n\nSimilar packages already exist, some relatively old, some too \"low-level\".  \nPart of the goal of this package was also to practice Python OOP.  \n\n## Usage\n\nTo install this package, you simply need to `pip install serialroomba`\n\nHere is an example script:\n```python\nfrom serialroomba.serialroomba import SerialRoomba\nfrom serialroomba.controllers import CleaningMode, Mode\n\nroomba = SerialRoomba(\"/dev/ttyS0\")\nroomba.mode_controller.current_mode = Mode.SAFE\nroomba.cleaning_controller.side_brush_pwm = 10\nroomba.mode_controller.current_mode = Mode.PASSIVE\nroomba.cleaning_controller.current_cleaning_mode = CleaningMode.SPOT\n```\n\n## Not implemented\n\n### Motors (Opcode: 138)\n\n\"This command lets you control the forward and backward motion of Roomba\u2019s main brush, side brush,\nand vacuum independently.\"  \nSince the state and direction of all cleaning motors need to be sent in a single byte,\nmanaging the last state of them becomes complicated.  \nThe same functionality can be achieved using:\n\n- main_brush_pwm\n- side_brush_pwm\n- vacuum_pwm\n\n### LEDs (Opcode: 139)\n\n\"This command controls the LEDs common to all models of Roomba 500.\"\n\n### Scheduling LEDs (Opcode: 162)\n\n\"This command controls the state of the scheduling LEDs present on the Roomba 560 and 570.\"\n\n### Digital LEDs Raw (Opcode: 163)\n\n\"This command controls the four 7 segment displays on the Roomba 560 and 570.\"\n\n### Digit LEDs ASCII (Opcode: 164)\n\n\"This command controls the four 7 segment displays on the Roomba 560 and 570 using ASCII character codes.\"\n\n### Buttons (Opcode: 165)\n\n\"This command lets you push Roomba\u2019s buttons. The buttons will automatically release after 1/6th of a\nsecond.\"\n\n### Song (Opcode: 140)\n\n\"This command lets you specify up to four songs to the OI that you can play at a later time. Each song is\nassociated with a song number.\"\n\n### Play (Opcode: 141)\n\n\"This command lets you select a song to play from the songs added to Roomba using the Song command.\"\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "Serialroomba is a package that aims to simplify the control of a Roomba over its serial port.",
    "version": "0.1.2",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3597dbffffff506288b1d25fe42ffd83989fc3b74d0dba6afe286ac4ebc4195f",
                "md5": "90e0e392f9b09dc9c2ed508d0c436221",
                "sha256": "cbc1254b769ca16cf13c8251a80d1d030967ae92834a232dcf64aaa77fa9ba29"
            },
            "downloads": -1,
            "filename": "serialroomba-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "90e0e392f9b09dc9c2ed508d0c436221",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 24916,
            "upload_time": "2023-04-26T17:32:59",
            "upload_time_iso_8601": "2023-04-26T17:32:59.752516Z",
            "url": "https://files.pythonhosted.org/packages/35/97/dbffffff506288b1d25fe42ffd83989fc3b74d0dba6afe286ac4ebc4195f/serialroomba-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4eaa8a98c56e9fa0c1f3c93eb76289b73c3ee8897adbb18f6db9b972bbd8df48",
                "md5": "6e824c28cf9b52e8e5f1624666bc77a3",
                "sha256": "85af4e7b0e42a5dfb97b0c68cc6341eb976b2b30626f7744c5e3f2908bce1a0d"
            },
            "downloads": -1,
            "filename": "serialroomba-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "6e824c28cf9b52e8e5f1624666bc77a3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 9005,
            "upload_time": "2023-04-26T17:33:02",
            "upload_time_iso_8601": "2023-04-26T17:33:02.287491Z",
            "url": "https://files.pythonhosted.org/packages/4e/aa/8a98c56e9fa0c1f3c93eb76289b73c3ee8897adbb18f6db9b972bbd8df48/serialroomba-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-26 17:33:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "jtommi",
    "github_project": "serialroomba",
    "lcname": "serialroomba"
}
        
Elapsed time: 0.06024s