0

Coding Help with Neopixel Infinity Mirror project
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Coding Help with Neopixel Infinity Mirror project

by Emordrome on Thu Sep 20, 2018 9:31 am

NOTE: This gets pretty rambly, so the 3 questions I'd like to address are in colored font, hope it helps.

Hi,


I'm a newbie working on building a Infinity mirror with an Arduino-controlled Neopixel RGBW strip. This is my first time working with Arduino and addressable LEDs. I have some
(not a lot) of experience with non addressable LEDs, putting circuits together, soldering, etc. For right now, I want to work with the coding before I start constructing the mirror.

I'm using the following LED strip : Adafruit NeoPixel Digital RGBW LED Strip - Black PCB 60 LED/m 1m PID: 2841 (**Right now there are 60 LEDs connected; I will need to clip a few off the backend when I install them in the mirror.) And I'm using an Arduino Uno.

I have the strip powered up and have uploaded and successfully run strandtest. I've also read the Uberguide.

So here is my question for you:

I would like to get some familiarity with coding by uploading some sketches to animate the LEDs. I've found some cool ones and tried to upload the code by downloading a file and opening it in the IDE. The sketch didn't run properly and I felt pretty lost attempting any troubleshooting - I have a hard time figuring out why things go in a certain order- Is there anything in the Adafruit Learning site that will help with this? Eventually (soonish) I would like to upload borrowed code for the mirror operation. Eventually (longterm) I'd like to take a shot a creating a sketch from scratch. I've got a couple ideas that may be pretty neat. I have read (with decent comprehension) the strandtest code in the uberguide. That seems simple enough, but I get lost quick trying to decipher codes I've found online. How can I get from understanding, say, a given line of code, to understanding how to put things together to make something happen?

One more question, I seem to find more coding written for RGB LED strips than RGBW. Can I simply modify the parameters like I did in strandtest to make it work on RGBW ?

Emordrome
 
Posts: 3
Joined: Tue Aug 28, 2018 1:23 am

Re: Coding Help with Neopixel Infinity Mirror project

by Emordrome on Thu Sep 20, 2018 10:38 am

I may have found answers to 2 of my questions:

blue question : "One more question, I seem to find more coding written for RGB LED strips than RGBW. Can I simply modify the parameters like I did in strandtest to make it work on RGBW ?"


I read that fast LED does not work with RGBW at all. Sketches written for Neopixel RGB strips should be compatible with RGBW strips. Is this correct?



Other 2 questions: I just read about Circuit Python and that it is a good way for beginners to start coding. I know that CP is software and I found a link to download, but I'm unclear on how it works. Can I find Coding for LED effects thru CP?

Emordrome
 
Posts: 3
Joined: Tue Aug 28, 2018 1:23 am

Re: Coding Help with Neopixel Infinity Mirror project

by adafruit_support_carter on Thu Sep 20, 2018 12:31 pm

It is the intent of CircuitPython to provide a more beginner friendly start to programming. This is mainly due to:
  • Cleaner syntax. No ;'s or {}'s all over the place.
  • Interpreted. You can type in commands and have them run instantly - no compiling/uploading required.
More info in these two Learn Guides:
https://learn.adafruit.com/welcome-to-c ... n/overview
https://learn.adafruit.com/circuitpytho ... essentials

Unfortunately, CircuitPython will not run on an Arduino UNO. The "welcome" guide above provides info on what hardware CircuitPython will run on. The Circuit Playground Express is a good option as it comes with a lot of sensors built on to the board.

I have a hard time figuring out why things go in a certain order- Is there anything in the Adafruit Learning site that will help with this?
How can I get from understanding, say, a given line of code, to understanding how to put things together to make something happen?

For both of these, I'd say by just continuing to play around and experiment with your code and following various online examples. You can do this with either Arduino or CircuitPython. Our Learn Guide has a whole series on Arduino basics, look for these written by Simon Monk:
https://learn.adafruit.com/lesson-0-getting-started
For CircuitPython - the "essentials" guide above goes over most of the basics.

Can I simply modify the parameters like I did in strandtest to make it work on RGBW ?

As it sounds like you've discovered - yes. Depending on which library you are using.

adafruit_support_carter
 
Posts: 6664
Joined: Tue Nov 29, 2016 2:45 pm

Re: Coding Help with Neopixel Infinity Mirror project

by Emordrome on Thu Sep 20, 2018 2:47 pm

Thank you for your reply and that does clear a few things up. And thanks for pointing me to the Getting Started with Arduino tutorial. This is where I’ll start..

Thanks

Greg

Emordrome
 
Posts: 3
Joined: Tue Aug 28, 2018 1:23 am

Please be positive and constructive with your questions and comments.