Skip to main content

busytag_tool

PyPI version License

Python library and CLI to interact with Busy Tag devices using the USB CDC interface.

Installation

$ pip install busytag

CLI usage

If you have multiple devices connected to your machine, you should specify the port with the --device flag. If only one device is connected, the tool will automatically use it.

$ busytag-tool

	USAGE: busytag-tool [flags] <command> [<args>]

Available commands:
  help: Prints this message
  list_devices: Lists available devices
  info: Displays device information
  list_pictures: Lists pictures in device
  list_files: Lists files in device
  get_picture: Gets the filename of the picture being shown
  set_picture <filename>: Sets the picture shown in the device
  put <filename>: Uploads <filename>
  get <filename>: Copies <filename> from the device to the working directory
  rm <filename>: Deletes <filename>
  set_led_solid_color <6 hex RGB colour>: Sets the LEDs colour
  apply_led_preset <preset name>: Sets the LEDs colour according to a preset
  get_brightness: Gets current display brightness
  set_brightness <brightness>: Sets current display brightness (int between 1 and 100, inclusive

$ busytag-tool set_picture coding.png

Config

A config file is created at ~/.busytag.toml. You can add "led preset" entries there, which can then be used with the apply_led_preset to change the device's LED colours. For example, here are two entries, one that applies the same colour to all LEDs, and another that alternates colours:

[[led_presets.red]]
pins = 127
color = 'FF0000'

[[led_presets.rb]]
pins = 85
color = 'FF0000'

[[led_presets.rb]]
pins = 42
color = '0000FF'

The BusyTag device has seven LEDs (with the first one, 0, at the bottom left of the device), identified in this tool by powers of two. The pins entry in the config is the sum of which pins we want to apply the colour (so 127 applies to all, while 85 applies to pins 0, 2, 4 and 6).

API usage

from busytag import Device, LedConfig, LedPin

bt = Device('/dev/fooBar')
bt.set_active_picture('coding.gif')
bt.set_led_solid_color(LedConfig(LedPin.ALL, 'FF0000'))

Metadata

Release files for busytag 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for busytag 0.1.5
File Size Uploaded
busytag-0.1.5.tar.gz 11.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for busytag 0.1.5
File Interpreter ABI Platform
busytag-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 22.2 kB

Release files / busytag-0.1.5.tar.gz

Download URL busytag-0.1.5.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5ff92883236881803768efb29fbd18960011c578aea84d5737dbe6f9249946d1
BLAKE2b-256 checksum
How to use checksums
56c9cbecb3c7af4d04b866bbf1aadfc5205b6a294e599df34590ff599738a92a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.2

Release files / busytag-0.1.5-py3-none-any.whl

Download URL busytag-0.1.5-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0108b3b62c042bbe040290affaf20eba5c472756d29f0f1404d19094295176fb
BLAKE2b-256 checksum
How to use checksums
75d059a0c436c974883f9b747f4b1d747163d77851f4efecc2294d479658a926
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.2

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page