Micromelon Python Module
This module provides an API for connecting and controlling Micromelon Rovers and simulated rovers in the Micromelon Robot Simulator.
The API is equivalent to what is available in the Micromelon Code Editor application.
Installation
pip install micromelon
Usage
After import you will need a reference to the RoverController
from micromelon import *
rc = RoverController()
The RoverController object contains all the functionality for connection and control of the robot's state.
At the start of any script that controls the rover you will need to connect and put the rover in a running state.
Once complete you will need to return the rover to the idle state and optionally you can end the Python program.
rc.connectBLE(1) # Connects over Bluetooth to rover with ID of 1
rc.startRover() # Puts in running state
# Body of script controlling rover
# eg. Motors.write(20, 20, 1)
rc.stopRover() # Returns to idle state
rc.end() # Disconnects and end Python program
Full code examples available in the examples folder.
Documentation
Generating Documentation
Full API documentation available at https://micromelon-robotics.github.io/mm-pymodule/
Documentation is generated through the python module pdoc3.
Full documentation on pdoc available here.
1. Installing pdoc
Install pdoc through pip.
Requires python 3.
pip3 install pdoc3
2. Generating HTML
pdoc --html --template-dir docs/pdoc_templates -o docs micromelon -f
3. Running docs locally
You can run the documentation as a webserver on your local machine with:
pdoc --http : micromelon
Then open http://localhost:8080/ in a browser.
Building
Get Python build tool
python -m pip install --upgrade build
Build package
python -m build
Uploading
Install twine
python -m pip install --upgrade twine
Uploading
python -m twine upload dist/*
Metadata
Release files for micromelon 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| micromelon-1.2.1.tar.gz | 38.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| micromelon-1.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 88.3 kB
Release files / micromelon-1.2.1.tar.gz
| Download URL | micromelon-1.2.1.tar.gz |
|---|---|
| Size | 38.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd5592cbe81c1fd24765059e42fa7b94ead4a367e8ce76a6849f77ac85d34c05
|
|
BLAKE2b-256 checksum How to use checksums |
08b5319e9e9f2302bb72d74c9defb9ad9e2c698bdefcec2ce926117ea4d3c1a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / micromelon-1.2.1-py3-none-any.whl
| Download URL | micromelon-1.2.1-py3-none-any.whl |
|---|---|
| Size | 50.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5fc49ef2f43f0b2365623d0ab6935a6e3bfcd775567c796fb7260e2c94ddda01
|
|
BLAKE2b-256 checksum How to use checksums |
d8708d3776df32ef6266a39e736efd54a4b5fee2a2b1ec90e218df3e462ef0a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for micromelon 1.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.