Tom Ritchford edited this page May 13, 2017 · 1 revision

class bibliopixel.drivers.WS2801.WS2801

WS2801 is for controlling WS2801 strips on devices that have hardware SPI ports, like the Raspberry Pi or BeagleBone Black. The majority of its implementation and properties exist in DriverSPIBase. See SPI Setup for more details.

Note: SPI devices typically require root access in order to write to the SPI port. Any scripts using this class should be run with sudo.

__init__

(num, c_order = ChannelOrder.RGB, use_py_spi = True, dev="/dev/spidev0.0", SPISpeed = 1)

  • num - Number of pixels to be controlled.
  • c_order - Optional: Channel order used by the attached display. Can be any of the six options in the ChannelOrder class. See Channel Order for more details.
  • use_py_spi - If True, SPI communication is handled by py-spidev which provides faster output. Otherwise a file access method is used.
  • dev - The SPI device path to use. See SPI Setup for more details.
  • SPISpeed - The SPI speed, in MHz, to use when communicating with the strip. The WS2801 technically has a maximum clock speed of 25MHz but in practice rarely runs well beyond 1MHz, which the driver defaults to. Changing the SPI speed for WS2801 is not recommended.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.