Post by Scarr on Jan 23, 2021 22:59:49 GMT -8
I am trying to run Step 6 in this setup (https://www.switchdoc.com/wp-content/uploads/2020/08/SmartGardenSystemAssemblyAndTestManual_20200802CD.pdf) which is just running the SGS2.py setup script. However, I am getting the following error:
pi@raspberrypi3b:~/SDL_Pi_SmartGardenSystem2 $ sudo python3 SGS2.py
Traceback (most recent call last):
File "SGS2.py", line 43, in <module>
import pixelDriver
File "/home/pi/SDL_Pi_SmartGardenSystem2/pixelDriver.py", line 28, in <module>
LED_STRIP = ws.SK6812_STRIP_RGBW
NameError: name 'ws' is not defined
Traceback (most recent call last):
File "SGS2.py", line 43, in <module>
import pixelDriver
File "/home/pi/SDL_Pi_SmartGardenSystem2/pixelDriver.py", line 28, in <module>
LED_STRIP = ws.SK6812_STRIP_RGBW
NameError: name 'ws' is not defined
I have no idea what this "ws" variable is referring to, here is a portion of the pixelDriver.py script:
from __future__ import division
from __future__ import print_function
# NeoPixel library strandtest example
# Author: Tony DiCola (tony@tonydicola.com)
#
# Direct port of the Arduino NeoPixel library strandtest example. Showcases
# various animations on a strip of NeoPixels.
from builtins import range
from past.utils import old_div
import time
import state
from neopixel import *
# Check for user imports
import config
# LED strip configuration:
LED_COUNT = 8 # Number of LED pixels.
LED_PIN = config.pixelPin # GPIO pin connected to the pixels (must support PWM!).
LED_FREQ_HZ = 800000 # LED signal frequency in hertz (usually 800khz)
LED_DMA = 10 # DMA channel to use for generating signal (try 10)
LED_BRIGHTNESS = 255 # Set to 0 for darkest and 255 for brightest
LED_INVERT = False # True to invert the signal (when using NPN transistor level shift)
LED_CHANNEL = 0
from __future__ import print_function
# NeoPixel library strandtest example
# Author: Tony DiCola (tony@tonydicola.com)
#
# Direct port of the Arduino NeoPixel library strandtest example. Showcases
# various animations on a strip of NeoPixels.
from builtins import range
from past.utils import old_div
import time
import state
from neopixel import *
# Check for user imports
import config
# LED strip configuration:
LED_COUNT = 8 # Number of LED pixels.
LED_PIN = config.pixelPin # GPIO pin connected to the pixels (must support PWM!).
LED_FREQ_HZ = 800000 # LED signal frequency in hertz (usually 800khz)
LED_DMA = 10 # DMA channel to use for generating signal (try 10)
LED_BRIGHTNESS = 255 # Set to 0 for darkest and 255 for brightest
LED_INVERT = False # True to invert the signal (when using NPN transistor level shift)
LED_CHANNEL = 0
LED_STRIP = ws.SK6812_STRIP_RGBW
#LED_STRIP = ws.SK6812W_STRIP
#LED_STRIP = ws.SK6812W_STRIP
Please help!