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 hashes)

Uploaded Python 3

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