Serialroomba is a package that aims to simplify the control of a Roomba over its serial port.
Project description
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:
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."
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file serialroomba-0.1.2.tar.gz
.
File metadata
- Download URL: serialroomba-0.1.2.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.10.6 Linux/5.15.0-1027-raspi
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85af4e7b0e42a5dfb97b0c68cc6341eb976b2b30626f7744c5e3f2908bce1a0d |
|
MD5 | 6e824c28cf9b52e8e5f1624666bc77a3 |
|
BLAKE2b-256 | 4eaa8a98c56e9fa0c1f3c93eb76289b73c3ee8897adbb18f6db9b972bbd8df48 |
File details
Details for the file serialroomba-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: serialroomba-0.1.2-py3-none-any.whl
- Upload date:
- Size: 24.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.10.6 Linux/5.15.0-1027-raspi
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbc1254b769ca16cf13c8251a80d1d030967ae92834a232dcf64aaa77fa9ba29 |
|
MD5 | 90e0e392f9b09dc9c2ed508d0c436221 |
|
BLAKE2b-256 | 3597dbffffff506288b1d25fe42ffd83989fc3b74d0dba6afe286ac4ebc4195f |