Okay my arduino just arrived and i have spent the day playing with it, but i can't get something to work, i have four LED's conected 1x Red, 1x Blue, 2x White, i need the Red and blue to flash very quickly like a police light, and the white lights to flash alternativly like police car headlights, i can get both of these sequences to run separatly, but not together as i can;t figure out how to combine the two seperate bits of code.
Here is what i thought the code should look like, but it it make's errors and won;t upload to the arduino Duemilanove:
you have two void loop functions. You only need, or more so, must only have one. Also, once you combine the two, you will need to tweak the code, otherwise what will happen is first your red and blue lights alternate (first blue, then red), and only once they stop flashing, the headlights alternate once, then they will stop and wait for the red and blue lights to flash through the sequence. I am guessing you want the two to occur parallel to each other, which is doable, but it wont happen if you just throw the contents of your second loop function into the end of the first one.