Skip to main content

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


Download files

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

Source Distribution

beeyberry-lib-0.0.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

beeyberry_lib-0.0.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file beeyberry-lib-0.0.1.tar.gz.

File metadata

  • Download URL: beeyberry-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

Hashes for beeyberry-lib-0.0.1.tar.gz
Algorithm Hash digest
SHA256 60174d587ecc20cfb4baf981d441d3ef521353ae220b1a2d7ef2354e07ef86cf
MD5 afdbaa12f8beebceebf3cb1c1d07f294
BLAKE2b-256 e82ca4a0b8c554fff3d6541deccdc833a8df4bc03226f00f5022a4726d7d9d96

See more details on using hashes here.

File details

Details for the file beeyberry_lib-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for beeyberry_lib-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cb4295a7b164deb486e689dbc675c8a651deb587f37647557c3334cf23f7c90c
MD5 9f906ced1de41e0c1fb99393889c9d06
BLAKE2b-256 2670c763d4d4bc6ade997372887eae74a582a0edc03818a1bf9c5c42090bd758

See more details on using hashes here.

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