Starting the Program design
In flow chart I started off really simple program having an output go on and off to see how long the delay is between flashes. I think this will be adequate amount of time, but will need to test this once I have build the circuit. I could carry on like this for every individual flash in my program however there must be a more effective way. I also need to work out how I will use my switch as an input in the circuit.
Sub flashes
As my program will involve a lot of flashes I didn't want my program to be miles long. Whilst looking at the picaxe manual 2 I saw there was a 'sub flash' command which call on sections of code into the main body and can be repeated as many times as needed meaning that the same section didnt have to be written over and over again. I decided to break down my program into 8 sub flashes (8 is the maximum amount of sub flashes which can be created in any one program)
Changes
As shown below I created all my sub flashes and then added 'gotosub' commands in the main body of the program. I have used 1000 delays between each flash and added a delay at the end of each sub flash so I don't have to add any delays in the main body as they should all be adequately spaced apart. I also added my input into the circuit however I think that PIN has to be an input so will have to change that.
Speeding up flashes
flashes were too slow paced and so I went back onto picaxe and experiment with decreasing the speed lower than 1000 (something I didn’t think was possible) I put the speed down to 500, but it made the flashes look dim as opposed to speeding up so decreased to a tenth of a second which improved the speed and gave the product a much better pace.
I have changed most of my sub flashes to have different paces and removed some of the 'boring flashes'