if i have a loop that is never ending say a synthisizer and i want to pull out of the loop with a stop button how would i go about it here is the senario
i have 3 arrays
1st is Lights
2nd is Lights_settings
3rd is lights_order
the 1st array holds the value of each light 0-255
eg
lights0 = 0
lights1 = 10
lights3 = 255
ect
the 2nd array holds the filename of where the data that populates the array Lights is eg
Lights_settings0 = c:/lights0.txt
Lights_settings1 = c:/lights1.txt
Lights_settings2 = c:/lights2.txt
ect up to 20
the final array stores a string of numbers which is a lighting pattern eg
lights_order0 =111000444333
lights_order1 =121222333444
what the program does is takes what ever light_order youselect and reads the string of numbers in we will use Lights_order1 as an example
it then reads the first number which is 1 and and sets lights array with the values in the file that light_settings1 has it then holds for 1 secound then reads the next number in which is 2 and sets lights array with the values in the file that light_settings2 has
it does this until it gets to the end of the string of numbers then repeats again
as you can see im stuck in a never ending loop which crashes the program what i need to do is hav an interupt that can pull us out of the loop how should i do this
(hope thats not to much to take in lol)
oderbang
i have 3 arrays
1st is Lights
2nd is Lights_settings
3rd is lights_order
the 1st array holds the value of each light 0-255
eg
lights0 = 0
lights1 = 10
lights3 = 255
ect
the 2nd array holds the filename of where the data that populates the array Lights is eg
Lights_settings0 = c:/lights0.txt
Lights_settings1 = c:/lights1.txt
Lights_settings2 = c:/lights2.txt
ect up to 20
the final array stores a string of numbers which is a lighting pattern eg
lights_order0 =111000444333
lights_order1 =121222333444
what the program does is takes what ever light_order youselect and reads the string of numbers in we will use Lights_order1 as an example
it then reads the first number which is 1 and and sets lights array with the values in the file that light_settings1 has it then holds for 1 secound then reads the next number in which is 2 and sets lights array with the values in the file that light_settings2 has
it does this until it gets to the end of the string of numbers then repeats again
as you can see im stuck in a never ending loop which crashes the program what i need to do is hav an interupt that can pull us out of the loop how should i do this
(hope thats not to much to take in lol)
oderbang