Hi thanks for reply
I've been looking at using for loops or the milli tutorial and it makes sense, it's seems a bit complicated when I try to imagine what I'm trying to do, I need to just keep reading through and trying to make it a bit more complex at a time
(the project is a bunch of flowers that move via muscle wire, as you walk near them it picks you up with ultra sound and triggers different movements of the flowers from a bunch or pre written movement funcitons (ideally, or somehting like that), ie slowly, quickly, pwm to make it move differently, wobble, etc or a library of movements/functions and it picks a random number and triggers one of the movements, doing this simultaneously for up to 8x flowers without pausing while it moves one flower then onto the next so it has a random and more natural feel to it. or any method that does the same, this is at the edge of my programming knowledge)
I thought logically it might be easier if you could have one loop running the ultrasound trig/echo loop and updating a global variable with the distance it reads
Another loop running if or switch on the distance reading and selecting movement patterns
then either a loop for each flower that gets sent stuff from another variable or function , random sequence generator, or something to that effect. or a loop that runs all the flowers and steps through sequences when each flower is sent a trigger of some sort from the ultrasound reading
I was hoping I could do that with duinos? but I can't seem to find much documentation yet, i tried the other day but the guide is for ide021 or something and the folders aren't the same on 1.02 so am not sure if I got that wrong, or I was going to try the milli / interrupts thing and try to think out a way to do all that
it's a syntax problem or programming really I know pretty much the kinds of things you could do but not how to string it together in that way, understand is complicated and am not expecting a sketch from someone, sounds like that's some good feedback though, my nest bet is to concentrate on the milli example of flashing two led's and go from there?
Many thanks again
Dominic