0

Adafruit-IO & Circuitpython Neopixels
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adafruit-IO & Circuitpython Neopixels

by SoftwareCornwall on Sun Mar 24, 2019 2:13 pm

Hi

I'm trying to set up NeoPixels to respond to button presses via Adafruit-IO. Idea is to animate morse code ticker tape style along the Neopixel at each end. The buttons are the morse encoders. I can code the morse messages. Send the messages to the Adafruit-IO. I can read the messages back. What I can't seem to do is have MQTT or Neopixel in the same script so that the messages can be read and then displayed.

The reason seems to be the use of 'sudo' to run the script. It throws an error of 'Adafruit-IO' not found. The use of the Neopixel means that sudo must be used. Omitting the sudo throws a different swig error.

Any ideas around this?

SoftwareCornwall
 
Posts: 2
Joined: Sun Feb 10, 2019 8:33 am

Re: Adafruit-IO & Circuitpython Neopixels

by brubell on Mon Mar 25, 2019 9:59 am

Sudo runs commands in a different environment, try `sudo -E yourscript.py` to preserve the current environment.

brubell
 
Posts: 473
Joined: Fri Jul 17, 2015 10:33 pm

Re: Adafruit-IO & Circuitpython Neopixels

by SoftwareCornwall on Mon Mar 25, 2019 12:02 pm

Thank you for that, I will try it.

SoftwareCornwall
 
Posts: 2
Joined: Sun Feb 10, 2019 8:33 am

Please be positive and constructive with your questions and comments.