color() takes from 1 to 3 positional arguments but 4 were given
I have a freshly install RPi Zero, and install pip than did: pip install neopixel_plus
Than tried your example:
from neopixel_plus import NeoPixel NeoPixel(test=True).color(150,200,0)
Only this gives an error:
File "/home/runtime/python/Heartbeat/src/Heartbeat/./test.py", line 4, in
Ehhh I only gave 3 arguments???
What goes wrong here? And how can I solve this?
For now I solved it by changing the lines to: #original_r = customization_json['rgb_colors'][0][0] if customization_json and 'rgb_colors' in customization_json else rgb_colors[0][0] original_r = customization_json['rgb_colors'][0] if customization_json and 'rgb_colors' in customization_json else rgb_colors[0] #original_g = customization_json['rgb_colors'][0][1] if customization_json and 'rgb_colors' in customization_json else rgb_colors[0][1] original_g = customization_json['rgb_colors'][1] if customization_json and 'rgb_colors' in customization_json else rgb_colors[1] #original_b = customization_json['rgb_colors'][0][2] if customization_json and 'rgb_colors' in customization_json else rgb_colors[0][2] original_b = customization_json['rgb_colors'][2] if customization_json and 'rgb_colors' in customization_json else rgb_colors[2]
So by taking out the first [0] reference...
And changing the test code to:
from neopixel_plus import NeoPixel color_list = [50,200,0] NeoPixel(test=True, target='adafruit').color(color_list)
Than it works, but is this right???