PythonLib for BEEPBERRY
Project description
BEEPBERRY PYTHON-LIB
This is a Python library for BeepBerry. Currently, it includes functionalities for key, RGB light, and screen, encompassing three types of hardware. It can be easily installed via pip and simplifies the process of driving these hardware components.
Install instructions
From pip:
pip install --upgrade beepberry-lib
Examples
import beepbeery
#rgb
bb=beepberry.BEEPBERRY()
bb.rgb(0,0,100) #r,g,b form 0 to 255
time.sleep(1)
bb.rgb_off()
#button See: https://gpiozero.readthedocs.io/en/stable/recipes.html#button
bb.button #button.is_pressed button.wait_for_press() button.when_presse button.when_released
#scr
scr=bb.lcd
font = ImageFont.truetype("yahei.ttf", 24) # load font
scr.text(xy=(10,10),text='dice',fill='red',font=font)
scr.show()
bb.show_pic('test.jpg') #show pics directly
KEYMAP
* BBQ20KBD PMOD KEYBOARD LAYOUT
*
* +------+-----+----+----+----+----+----+-----+-----+-------+
* | | |BR ↑TPY- | | |
* | Ctrl | PgDn |←TPX- BL(HOME)TPX+→| PgUp | MENU |
* | | | ↓TPY+ | | |
* +------+-----+----+----+----+----+----+-----+-----+-------+
* | |
* +------+-----+----+----+----+----+----+-----+-----+-------+
* |# |1 |2 |3 |( | )|_ | -| +| @|
* | Q | W | E | R | T | Y | U | I | O | P |
* | | |PgDn|PgUp| \|UP |^ |= |{ |} |
* +------+-----+----+----+----+----+----+-----+-----+-------+
* |* |4 |5 |6 |/ | :|; | '| "| ESC|
* | A | S | D | F | G | H | J | K | L | BKSP |
* | ?| | [| ]|LEFT|HOME|RGHT|V+ |V- |DLT |
* +------+-----+----+----+----+----+----+-----+-----+-------+
* | |7 |8 |9 |? | !|, | .| `| |
* |LFTALT| Z | X | C | V | B | N | M | $ | ENTER |
* | | K+| K-| °| <|DOWN|> |MENU |Vx | |
* +------+-----+----+----+----+----+----+-----+-----+-------+
* | |0 |TAB | | |
* | LEFT_SHIFT | ~ | SPACE |RTALT| RIGHT_SHIFT |
* | | Kx| &| | |
* +------------+----+-------------------+-----+-------------+
Change Log
[0.0.1] - 2023-08-09
- First commit.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
beepberry-lib-0.0.1.tar.gz
(4.5 kB
view details)
Built Distribution
File details
Details for the file beepberry-lib-0.0.1.tar.gz
.
File metadata
- Download URL: beepberry-lib-0.0.1.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f96ebfd26c9a65c990f7357d9e160c392e8c486030d1f69ca966ec7b4e3ab66c |
|
MD5 | deeb41cdc18036912a9e6cde46dcb983 |
|
BLAKE2b-256 | ffdf6a7767de38dd2505571d20355fdd7abbc0cc6ab8f83b6ae7bdccbaaa646b |
File details
Details for the file beepberry_lib-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: beepberry_lib-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 603743681b00f55a8562b07aa97e6920fccea8d30891f54a2111481810e3cda0 |
|
MD5 | 204fe391db532f09b20bdc50baecce61 |
|
BLAKE2b-256 | 018ab1a7c7c65e37dd45c20063dd92ffd2dd7bfe46e8f6b56404b39f058cd15d |