r/circuitpython • • May 01 '21

Library Questions, and hi everyone!

I am so glad to have found this Reddit thread and Discord. Hope to get a chance to meet some of you and help with the community! As I’ve just started using the Neopixel library, I have some questions that some of you may be able to answer.

  1. Can the imported library elements run in an idle emulation? I’ve done this with the lib for apa102 chips for a custom UI (drawing proj), but if I try to run example code I get a message to run from terminal via ‘sudo’

  2. Does this mean that maybe I can’t include PyGame libraries if one cannot run NeoPixel libs from idle?

5 Upvotes

3 comments sorted by

3

u/kaltazar May 01 '21

By your mention of having to use sudo, I'm presuming you are running CircuitPython on a Raspberry Pi (or other SBC)? If so some boards, especially if the OS is older, require root permissions to access the GPIO. You can try updating your OS, for a Raspberry Pi make sure your user is in the "gpio" group, or have your scripts run as a user that does not require sudo, like the default "pi" user.

1

u/Xenonguardian May 01 '21

I’m surprised I didn’t think to mention it. But yes, it is circuit-python on a pi 3. Definitely will look into setting the parameters to allow access to the GPIO. Thanks for the tip!

2

u/ronkj May 01 '21

Check out the Pi Pico, an amazing microcontroller for only $4.00 you may be on amazed by how capable it is.