Skip to main content

A Python module for the 4tronix Bit:bot XL and stubs for the BBC micro:bit.

Reason this release was yanked:

Obsolete

Project description

mbitutils (micro:bit Utilities)

A Python module for the 4tronix Bit:bot XL and stubs for the BBC micro:bit.

The intention is to use this package with the Visual Studio Code extension found at https://github.com/oivron/microbit-extension-vscode. This extension is also available from Visual Studio Code Marketplace.

The stubs for micro:bit complements the following: https://github.com/PhonicCanine/microbit.

Installation

pip install mbitutils

Usage

See micro:bit Micropython API for a complete documentation/API on how to use the micro:bit.

Import

from bitbot import *
from music import *
from speech import *

Bit:bot XL API

bias(direction, percent)
# Set left/right bias to match motors.
# Direction: LEFT or RIGHT.
# Bias in %.
go(direction, speed)
# Move robot forwards or backwards at speed.
# Direction: FORWARD or REVERSE.
# Speed in %.
goms(direction, speed, duration)
# Move robot forwards or backwards at speed for milliseconds.
# Direction: FORWARD or REVERSE.
# Speed in %.
# Duration in milliseconds.
spin(direction, speed)
# Rotate robot in direction at speed.
# Direction: LEFT or RIGHT.
# Speed in %.
spinms(direction, speed, duration)
# Rotate robot in direction at speed for milliseconds.
# Direction: LEFT or RIGHT.
# Speed in %.
# Duration in milliseconds.
buzz(duration)
# Sound a buzz for milliseconds.
# Duration in milliseconds.
linesensor(direction)
# Read line sensor.
# Directon: LEFT or RIGHT.
stop()
# Stops the Bit:bot.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

mbitutils-0.0.4-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file mbitutils-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: mbitutils-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

File hashes

Hashes for mbitutils-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8de4ef5e96225a933cd8d18467f51e977205d4af53bb9dba7f7c3f49fb58e950
MD5 ac39bc6e740df424f79c7d5f370fd6cf
BLAKE2b-256 af585fd36bf16db807dd33dcf69b1449bef4f70833a086a3446d06297a90d84f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page