Need to do two tasks at once.


hello everyone.
  have 2 things going on @ 1 time.  have 1 of analog ports controlling radio shack tri color led strip.  have cut strip running 4 sets of 3 led's.  other task light normal 5mm led's digital ports pattern.
i trying figure out how have both of these tasks run @ same time,if possible, 1 doesn't have wait other finish.  have seen ways of using millis(), not sure how incorporated of this.

i know delays stop everything, 'void side_to_side' function laid out way example demonstrate want led's on digital ports, while led strip doing thing.

the attached file demo file radio shack widdled down work project.

thanks.

it not going easy there here. code have fine demo not intended used in real environment have more 1 thing do.

think of arduino man watch , row of switches. looks @ watch thousands of times per second. he's got list in front of him says @ time each switch supposed on or off. every time looks @ watch, scans down list of times find appropriate line. puts fingers on switches , pushes them - if pushed, doesn't care, he's following list , has nothing else except push switches.

do want 2 subsystems synchronised or intended out of sync? (one list or 2 lists of times?)


Arduino Forum > Using Arduino > Programming Questions > Need to do two tasks at once.


arduino

Comments