two different neopixel animations

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
zburhop
 
Posts: 88
Joined: Sun Sep 15, 2013 3:20 am

two different neopixel animations

Post by zburhop »

Hi,

I have two Neopixel animations I have figured out. I want the project to change between codes with a switch. They use delay() a lot but I don't really have time to learn to do functions so it seems like a button press to switch between them is out. I want the project to change between codes when I switch the part. Is there any reason why I cannot just mount two Arduinos and a switch that toggles from one input to another?

Zach

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: two different neopixel animations

Post by adafruit_support_bill »

I haven't tried it. But in theory, that should work. You would need to make sure you have a common ground connection between the Arduinos.
Since the two Arduinos will not be synchronized, there may be some glitching in your patterns as you switch from one to the other.

zburhop
 
Posts: 88
Joined: Sun Sep 15, 2013 3:20 am

Re: two different neopixel animations

Post by zburhop »

Nice. Thanks. Im much better with hardware then I am on the software side so this is prob a dumb question. But is there not a way to say "run this program on this pin, and this one on this pin without writing way more advanced code?

Zach

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: two different neopixel animations

Post by adafruit_support_bill »

The Arduino is a relatively bare-bones microprocessor. It does not have the resources to support a general-purpose real-time multi-tasking environment.

Although it is possible to multi-task with it, you need to structure your code to manage the timing and resources appropriately:

https://learn.adafruit.com/multi-taskin ... 3/overview

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”