Skip to main content

A small package to enable keyboard control of the Bittle robot dog.

Project description

my_bittle

example workflow

This is a package that enables control via keyboard or api of the Bittle robot from Petoi. This project is not affiliated with petoi or bittle officially. Try this project with your bittle on a test stand first where bittle's feat can't touch the ground, as it may result in commands that break your bittle.

The intent of this package is to make it easier to use a raspberry pi to control the bittle and build custom behavior using a raspberry pi. That said if you have a serial port open to the bittle on windows, it'll work too.

Installation

pip install my-bittle

Keyboard Control Usage

Connect to the bittle via serial (bluetooth, cable, ect).

On windows, something like this:

bittle-keyboard-control COM11

On linux, something like this:

bittle-keyboard-control /dev/ttyS0

API Usage

import time

from my_bittle.bittle_serial_controller import BittleSerialController, BittleCommand

port = "/dev/ttyS0"
my_bittle_controller = BittleSerialController(port=port)

my_bittle_controller.start()
my_bittle_controller.command_bittle(BittleCommand.FORWARD)
time.sleep(2)
my_bittle_controller.stop()

To see all available commands:

from my_bittle.bittle_serial_controller import BittleCommand

BittleCommand.print_all()

To send a custom command:

import time

from my_bittle.bittle_serial_controller import BittleSerialController

port = "/dev/ttyS0"
my_bittle_controller = BittleSerialController(port=port)

my_bittle_controller.start()
my_bittle_controller._send_cmd("b1 2 4 6")
time.sleep(2)
my_bittle_controller.stop()

Troubleshooting

Blank.

Project details


Download files

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

Source Distribution

my-bittle-0.0.4.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

my_bittle-0.0.4-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file my-bittle-0.0.4.tar.gz.

File metadata

  • Download URL: my-bittle-0.0.4.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for my-bittle-0.0.4.tar.gz
Algorithm Hash digest
SHA256 cbfb707050cd649178d6a97492a618a55b31c532c05da2108b9f0f6bd9686f7c
MD5 b9997189eed9a5bdc278a887af16b86f
BLAKE2b-256 67cb2aff2da71abc1640d388f965584155c5c6bff556bc03c921c85d9b6154ff

See more details on using hashes here.

File details

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

File metadata

  • Download URL: my_bittle-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for my_bittle-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3d952ce26f61fe8d302c15893e1ece41d56a11284a88adcc4869983e3be60de2
MD5 20ad928468104ace42c0cb794e9cc5ef
BLAKE2b-256 1aaa2aa1739449a2d8a95b48c4c3bea584e9bb0ef68e39a004b399f88634e027

See more details on using hashes here.

Supported by

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