Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

24 neopixel ring not working #172

Closed
madhunm opened this issue Jul 26, 2018 · 11 comments
Closed

24 neopixel ring not working #172

madhunm opened this issue Jul 26, 2018 · 11 comments

Comments

@madhunm
Copy link

madhunm commented Jul 26, 2018

I'm having an issue with running a 24 neopixel ring in direct mode.

I'm using a Pi 2

The python examples work fine; do you need access to my pi?

@vitormhenrique
Copy link
Owner

Well, I need so many things... but for helping you mostly:

  • You octoprint log,
  • What exactly have you tried to do to fix the issue,
  • What python examples code are you using.

There is a template for creating issues and asking help, there is also an troubleshooting guide, you did not follow any of those.
Also, I made this plugin as a free software, opensource and I support and help users just because I'm nice. But I don't like the assumption that I would stop whatever I'm doing to log on a remote rpi and fix some probably PEBCAK issue. You need to be cordial and follow community guidelines.

Please attach your octoprint log print screens of you configuration, and link to an example code that works on your setup, with those 3 things I'll probably be able to point it out what is going on....

@madhunm
Copy link
Author

madhunm commented Jul 26, 2018

@vitormhenrique My sincere apologies if I did not appear to be cordial.

Here are the steps I tried:

  1. Went through the issue list and say this: Problem with ws2812 led strip, directly on the raspberry #143 (comment)

When I run it with sudo python test.py 18 60 255 255 255 255 0, all the lights come on white and seem normal. no flickering, no led dimmer than the other etc.

  1. Installed rpi_ws281x and ran the strandtest.py; all the colors are working fine.

  2. I tried with Sudo and without it; did not make a difference. The Neopixel ring does not turn on.

Here are the screenshots of my setup:

octoprint_1
octoprint_2
octoprint_3
octoprint_4

About the log; Where is it located?

I once again apologize if I sounded ungrateful;

Thank you.

@vitormhenrique
Copy link
Owner

vitormhenrique commented Jul 26, 2018

No worries, sometimes I get a little frustrated with lack of information when asking help, you you are all right!

You can get the octoprint logs following this.

@vitormhenrique
Copy link
Owner

if you have a webcam enabled pointing to your led strip I can remote login on your pi and help troubleshoot, but I would need to see the light turning on / off to test it out...

Shoot an email on the email linked on my github profile with the access info.

@madhunm
Copy link
Author

madhunm commented Jul 26, 2018

Here is the Octoprint log:

octoprint.log

I shall revert with the access details in the morning; its 0130 here :)

@vitormhenrique
Copy link
Owner

have you sent the information on my email yet?

@madhunm
Copy link
Author

madhunm commented Jul 31, 2018

@vitormhenrique I just did. Apologies for the delay.

@vitormhenrique
Copy link
Owner

vitormhenrique commented Aug 6, 2018

Just to document: there were couple things that I had to do to fix this on @madhunm environment.
rpi_ws281x really needs sudo, and you need to setup up so your rpi does not ask for a password for sudo, so run:

sudo visudo

and add pi ALL=(ALL) NOPASSWD: ALL to the end of the file.

Also backlist the audio kernel:

sudo nano /etc/modprobe.d/snd-blacklist.conf

add:

blacklist snd_bcm2835

I don't know why but this system was refusing to work when passing the DMA instead of hard coding, so I needed to change the default code that handle the neopixel:

nano /home/pi/oprint/lib/python2.7/site-packages/octoprint_enclosure/neopixel_direct.py

changed to:


from neopixel import *
import sys
import time

LED_INVERT = False
LED_DMA = 10
LED_FREQ_HZ = 800000

if len(sys.argv) == 8:
    LED_PIN = int(sys.argv[1])
    LED_COUNT = int(sys.argv[2])
    LED_BRIGHTNESS = int(sys.argv[3])
    red = int(sys.argv[4])
    green = int(sys.argv[5])
    blue = int(sys.argv[6])
    address = int(sys.argv[7], 16)
else:
    print("fail")
    sys.exit(1)

strip = Adafruit_NeoPixel(LED_COUNT, LED_PIN, LED_FREQ_HZ, LED_DMA, LED_INVERT)
strip.begin()

color = Color(green, red, blue)

for i in range(LED_COUNT):
    strip.setPixelColor(i, color)

strip.show()

print("ok")

@madhunm
Copy link
Author

madhunm commented Aug 6, 2018

@vitormhenrique Thanks a million for your help! much appreciated.

@sfgabe
Copy link

sfgabe commented Aug 26, 2018

For reference, I also had to make the above code changes to get a neopixel 12 ring working on a pi 3b. Works fine now. Thanks @vitormhenrique !

@dionmindhive
Copy link

saved my bacon too. Thanks @vitormhenrique Lé Solved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants