Neopixel control apparently not working #140

Closed
opened 2018-05-12 18:06:42 +01:00 by gertorro · 5 comments
gertorro commented 2018-05-12 18:06:42 +01:00 (Migrated from github.com)

Hi there,
I'm having a rare issue with the enclosure pluging and a strip of neopixel LEDs.
Say I configure GPIO 4 as output (simple toggle on off), with that, I'm able to control pin 7 with no issues.
Then, I erase that configuration and put instead a Neopixel output on the same physical output and it does nothing when I send a sample color to show.
Any clue why this might be happening? I have attached the configuration just in case it gives you a hint.
Thanks in advance,
Germán

image

image

Hi there, I'm having a rare issue with the enclosure pluging and a strip of neopixel LEDs. Say I configure GPIO 4 as output (simple toggle on off), with that, I'm able to control pin 7 with no issues. Then, I erase that configuration and put instead a Neopixel output on the same physical output and it does nothing when I send a sample color to show. Any clue why this might be happening? I have attached the configuration just in case it gives you a hint. Thanks in advance, Germán ![image](https://user-images.githubusercontent.com/11411276/39959791-7bc3f500-5617-11e8-9f46-1ac467035936.png) ![image](https://user-images.githubusercontent.com/11411276/39959795-86d4c492-5617-11e8-8b94-7213c8bce27b.png)
vitormhenrique commented 2018-05-12 18:55:52 +01:00 (Migrated from github.com)

Yes, I know exactly what is going on, I think I did not fully document on the read-me how to get it working.
You need to use hardware capable PWM pins, and also install some libraries.
Follow this guide install everything and get it working, after that, it should work on the same pin that you configured following the guide.

Yes, I know exactly what is going on, I think I did not fully document on the read-me how to get it working. You need to use hardware capable PWM pins, and also install some libraries. Follow this [guide](https://learn.adafruit.com/neopixels-on-raspberry-pi?view=all) install everything and get it working, after that, it should work on the same pin that you configured following the guide.
gertorro commented 2018-05-12 19:22:49 +01:00 (Migrated from github.com)

Thanks for the fast response Victor
everything seems OK with the instructions until I arrive to this command:

pi@octopi:~/rpi_ws281x/python $ sudo python setup.py install Extracting in /tmp/tmpoF9Z2J Traceback (most recent call last): File "setup.py", line 4, in <module> use_setuptools() File "/home/pi/rpi_ws281x/python/ez_setup.py", line 145, in use_setuptools return _do_download(version, download_base, to_dir, download_delay) File "/home/pi/rpi_ws281x/python/ez_setup.py", line 120, in _do_download _build_egg(egg, archive, to_dir) File "/home/pi/rpi_ws281x/python/ez_setup.py", line 62, in _build_egg with archive_context(archive_filename): File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__ return self.gen.next() File "/home/pi/rpi_ws281x/python/ez_setup.py", line 100, in archive_context with ContextualZipFile(filename) as archive: File "/home/pi/rpi_ws281x/python/ez_setup.py", line 88, in __new__ return zipfile.ZipFile(*args, **kwargs) File "/usr/lib/python2.7/zipfile.py", line 770, in __init__ self._RealGetContents() File "/usr/lib/python2.7/zipfile.py", line 811, in _RealGetContents raise BadZipfile, "File is not a zip file" zipfile.BadZipfile: File is not a zip file

Any clue on that error? Google wasn't useful this time around.
Thanks again!
Germán

Thanks for the fast response Victor everything seems OK with the instructions until I arrive to this command: `pi@octopi:~/rpi_ws281x/python $ sudo python setup.py install Extracting in /tmp/tmpoF9Z2J Traceback (most recent call last): File "setup.py", line 4, in <module> use_setuptools() File "/home/pi/rpi_ws281x/python/ez_setup.py", line 145, in use_setuptools return _do_download(version, download_base, to_dir, download_delay) File "/home/pi/rpi_ws281x/python/ez_setup.py", line 120, in _do_download _build_egg(egg, archive, to_dir) File "/home/pi/rpi_ws281x/python/ez_setup.py", line 62, in _build_egg with archive_context(archive_filename): File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__ return self.gen.next() File "/home/pi/rpi_ws281x/python/ez_setup.py", line 100, in archive_context with ContextualZipFile(filename) as archive: File "/home/pi/rpi_ws281x/python/ez_setup.py", line 88, in __new__ return zipfile.ZipFile(*args, **kwargs) File "/usr/lib/python2.7/zipfile.py", line 770, in __init__ self._RealGetContents() File "/usr/lib/python2.7/zipfile.py", line 811, in _RealGetContents raise BadZipfile, "File is not a zip file" zipfile.BadZipfile: File is not a zip file` Any clue on that error? Google wasn't useful this time around. Thanks again! Germán
vitormhenrique commented 2018-05-12 20:16:58 +01:00 (Migrated from github.com)

Not really sure, you need to get those libraries installed before getting neopixel to work, post an issue on rpi_ws281x github, they could help you out... https://github.com/jgarff/rpi_ws281x, also try to find other tutorials on installing rpi_ws281x.

Not really sure, you need to get those libraries installed before getting neopixel to work, post an issue on rpi_ws281x github, they could help you out... https://github.com/jgarff/rpi_ws281x, also try to find other tutorials on installing rpi_ws281x.
gertorro commented 2018-05-13 18:11:03 +01:00 (Migrated from github.com)

Hello Victor, in the issues from the WS281X library appears the solution,
apparently the source that hosts the setuptools... file is corrupted.
After deleting it manually and downloading it again from the official python servers it runs like a charm.
I leave you the source of the fix: https://github.com/jgarff/rpi_ws281x/issues/290
so you can implement the automatic installation out of the box.
Thanks for the support, I personally think your work is of great value for those with 3D printers! Keep it up!
Regards,
Germán

Hello Victor, in the issues from the WS281X library appears the solution, apparently the source that hosts the setuptools... file is corrupted. After deleting it manually and downloading it again from the official python servers it runs like a charm. I leave you the source of the fix: [https://github.com/jgarff/rpi_ws281x/issues/290](https://github.com/jgarff/rpi_ws281x/issues/290) so you can implement the automatic installation out of the box. Thanks for the support, I personally think your work is of great value for those with 3D printers! Keep it up! Regards, Germán
vitormhenrique commented 2018-05-13 21:58:30 +01:00 (Migrated from github.com)

No problem! glad it work out for you!
I had problems trying to install automatically the requirements of this plugin using octoprint pip, I'll try to get this working for following releases.

No problem! glad it work out for you! I had problems trying to install automatically the requirements of this plugin using octoprint pip, I'll try to get this working for following releases.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Gandalf/OctoPrint-Enclosure#140