Step 3Program the Arduino
The basic concept behind the code is that it runs a loop 6.4 seconds long, broken into 64 100 millisecond "ticks." At each tick, I can have a light turn on, turn off, dim, brighten, etc. After it's gone through it all once, it goes right back to the beginning and repeats until the battery runs out.
ProtonPack.pde10 KB| « Previous Step | Download PDFView All Steps | Next Step » |













































loop() will take a bit longer than 6.4 seconds because digitalWrite/analogWrite take time too, but I can't see that making a difference in this case given that you're just making pretty effects with LEDs rather than controlling some ultra-precise piece of equipment. Just letting you know, for future reference.
Other than my general pickiness about code, I must say that's rather pretty :)
Glad you like the project!