joosteto / ws2812-spi

python routines to program the WS2812 RGB LED chips on the raspberry, using the hardware SPI MOSI.
GNU Affero General Public License v3.0
59 stars 23 forks source link

Following directions for testing, fails #5

Open dachshund-digital opened 6 years ago

dachshund-digital commented 6 years ago

Following directions for testing, fails:

import spidev import ws2812 spi = spidev.SpiDev() spi.open(0,0) ws2812.write2812(spi, [[10,0,0], [0,10,0], [0,0,10], [10, 10, 0]]) Traceback (most recent call last): File "", line 1, in AttributeError: 'module' object has no attribute 'write2812'

dir(ws2812) ['Color', 'Color_t', 'Color_t_swigregister', 'RGB2Color', 'Wheel', 'builtins', 'doc', 'file', 'name', 'package', '_newclass', '_object', '_swig_getattr', '_swig_property', '_swig_repr', '_swig_setattr', '_swig_setattr_nondynamic', '_ws2812', 'clear', 'colorWipe', 'dumpControlBlock', 'dumpDMA', 'dumpDMARegs', 'dumpLEDBuffer', 'dumpPWM', 'dumpPWMBuffer', 'dumpPWMControl', 'dumpPWMDMAC', 'dumpPWMStatus', 'dumpTransferInformation', 'getPWMBit', 'getPixelColor', 'getPixels', 'init', 'numPixels', 'rainbow', 'rainbowCycle', 'setBrightness', 'setPWMBit', 'setPixelColor', 'setPixelColorT', 'show', 'terminate', 'theaterChase', 'theaterChaseRainbow']