Coder Social home page Coder Social logo

pyws2812's Introduction

pyWS2812

Control WS2812 LED by UART Serial Port Protocol + non-gate transistor

The hardware requires a USB serial port module that supports a baud rate of more than 2.5 MHz (for example, CH34X, FT232RL) and a non-gate (preferably a Schmitt trigger)

After the serial port TX pin output is connected to the data port of the WS2812 LED through the inverter, the LED can be controlled by this module

通过UART串口协议+非门反相器来控制WS2812 LED🚨

硬件上需要一个支持2.5M波特率以上的USB转串口模块(例如CH34x, FT232RL 等)以及一个非门(最好是施密特触发器)

将串口TX引脚输出经过反相器后再连接到WS2812灯带的数据口后即可用本模块控制灯带了

使用教程 Usage

安装 installing: pip install pyws2812

from ws2812 import *

wsc = WS2812Controller("<PORT>", n_led=5)
wsc.turn_on_all()

不出意外的话,全部灯珠被点亮为白色 Then all the LEDs will be on.

更多详细的用法请参考源代码注释和示例 for more detail usage, please refer to the source code.

pyws2812's People

Contributors

phoenixsfly avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.