Skip to main content

wonderbits by mfeducation.

Project description

python-sdk

豌豆拼api文档链接

主要服务于豌豆拼硬件产品

需要搭配豌豆拼硬件模块使用

Powered by MFEducation

  1. 包含各个模块的api

    • 显示模块
    • 控制模块
    • 彩灯模块
    • 射频通信模块
    • 等等
  2. sdk中包含串口通信功能

    • 插上硬件模块可以直接通信

简单示例

创建一个py文件 demo.py

# 导入需要的模块
from wonderbits import Display, Control, Led
import time
import random

# 初始化模块
d1 = Display()
c1 = Control()
l1 = Led()

# 显示模块显示内容
d1.print(2, 1, 'value:')

# 计数变量
content = 1

for i in range(10):
    # 获取控制模块开关sw4的值
    sw4 = c1.get_sw4()
    # 在显示屏上显示sw4的值
    d1.print(2, 7, sw4)
    # 设置彩灯rbg随机颜色
    l1.set_rgb(random.randint(0, 255), random.randint(0, 255), random.randint(0, 255))

    # 显示模块显示计数值 
    d1.print(1, 1, content)
    # 将计数变量 递增1
    content += 1

运行py文件

运行环境需要python -V 为3版本
运行
python demo.py

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

wonderbits-4.3.0.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

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

wonderbits-4.3.0-py2.py3-none-any.whl (16.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file wonderbits-4.3.0.tar.gz.

File metadata

  • Download URL: wonderbits-4.3.0.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for wonderbits-4.3.0.tar.gz
Algorithm Hash digest
SHA256 0d6707b7d719cab79685b43f522dbe34bccd1ead556d21fed932071b9b56b4f7
MD5 b6e3ca904d4d233a20c7a8da1f45c53a
BLAKE2b-256 cbf01982e4250ba6495da7b7562004c0b118a4483da66a0c08be0b83be92300c

See more details on using hashes here.

File details

Details for the file wonderbits-4.3.0-py2.py3-none-any.whl.

File metadata

  • Download URL: wonderbits-4.3.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for wonderbits-4.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 97141b8b26c1d181482a13d6a9118a02d3dd27cd3bd4d6a8d4b818cad21c3e07
MD5 e3c3d8a9ad15246a21dc9073152756a6
BLAKE2b-256 fc475d6707f28aa3bd10eed41822d4a9bc9e62a7b600fad1505ca31310681d82

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