busytag_tool
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)
| File | Size | Uploaded | |
|---|---|---|---|
| busytag-0.1.5.tar.gz | 11.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|